Hemant Bhargava wrote:
> Hey Champs..
> 
> Can we write some ruby code into javascript ?
> 
> Can you guys light me?

you can make a main_scripts.js.erb inside one of your views

then you can mix in ruby and JS together. The ruby will be processed 
first, and then made into a static js file, then you can include that. 
OR, you can do inline JS in your views (it's yucky though :p ). You 
could also get crazy and include the Johnson gem and then get some crazy 
ruby generating JS on the fly stuff.

Good luck!

~Jeremy
-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to