Good morning, i am trying to write a js.erb. <% if current_user.login == "admin" %> var hide = false; <% else %> var hide = true; <% end %> or <% escape_javascript(if current_user.login == "admin") %> var hide = false; <% escape_javascript(else) %> var hide = true; <% escape_javascript(end) %> but every time I got an error in firebug: "invalid XML character". Can''t we just embended ruby in a javascript file? Thank you --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---