Unobtrusive javascript -> referencing instance varaiables

if i have a variable, such as: @text declared in my controller, how
would i go about dereferencing that in an .js.erb file?

i seem to see a lot of pages using: <%= @text %> to directly dereference
the value, but i can’t seem to get it to work… i get invalid symbol
errors (js errors) as soon as it hits “<%=”…

any help? thanks!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs