I'm giving up my search, I normally try to figure these things out on my own but I'm struggling hard and I just want this to work
I have the link_to seen below where @puser is the user of the profile I'm currently viewing.
<%= link_to 'Request', new_or_edit_relationship_path(nil), :remote => true, :locals => { :puser => @puser} %>
This in turn calls new_relationship_path which is a .js.erb file seen below
alert("<%= escape_javascript(puser.id) %>")
Why won't this work!? It's saying the puser variable or method is undefined. This works perfect if I was to just render a partial passing in the locals but no. Javascript doesn't want to play nice
Could anyone help explain why me or the program is stupid?