Chris Kottom wrote:
> The most straightforward way of doing what you want is: <%= my_var %>
> 
> On Wed, Apr 8, 2009 at 7:31 AM, SpringFlowers AutumnMoon <

are you sure?  if  my_var contains a newline character, then the 
Javascript code becomes

var title = hello
world;

and it will break?  sorry i haven't used RoR for a long time so don't 
know if any quote is given for <%= my_var %>


-- 
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-talk@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