I have a .html.erb file, with some javascript in it. I would like to do something like this:
var stuff = \'<%= @ruby_var.title %>\'
You can use the javascript_tag function to include Javascript in a .html.erb file.
Example:
javascript_tag "alert('This is a test')"
in your foo.html.erb will return
to the browser.