I give up my search, I usually try to figure these things out on my own, but I try my best and I just want it to work
I have a link as shown below where @puser is the user of the profile that I am currently viewing.
<%= link_to 'Request', new_or_edit_relationship_path(nil), :remote => true, :locals => { :puser => @puser} %>
This in turn causes new_relationship_path, which is the .js.erb file below
alert("<%= escape_javascript(puser.id) %>")
Why is this not working !? He says the variable or method puser is undefined. This works great if I should just do a partial transfer to the locals, but no. Javascript does not want to play beautifully
Can someone explain why I or the program are stupid?
ruby-on-rails-3
Tommelack
source share