RJS is just a javascript generator, and the javascript does not get executed until it's client side. Therefore you cannot determine the value of the select option while still in Ruby.
RJS is just a javascript generator, and the javascript does not get executed until it's client side. Therefore you cannot determine the value of the select option while still in Ruby. If you want to do an "if" statement on the selected value you'll need to do it in Javascript.Page.
Thanks a lot for the answer ryanb, for some reason I couldn't find an answer to this in the Rails books and on forums. Actually, I think the difficulty for RJS newbie like me is that the difference is very subtle - yes, RJS is a javascript generator, but why can't it also generate conditionals / etc. For you, converting Ruby into JS? – Vlad Aug 18 '09 at 17:11 This is a limitation of the Ruby language.
The "=" operator is a method and the behavior can be overridden, but "if" behavior cannot. If you are comfortable with javascript then I recommend not using RJS. Instead just mix javascript and erb directly (with a view file like index.js.
Erb). – ryanb Aug 18 '09 at 17:16.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.