Link_to dynamic id problem


This works:
<%= link_to “show”, {:action => “show”, :id => 1 }, {:title => } %>

This does not:
<%= link_to “show”, {:action => “show”, :id => }, {:title => } %>

This is all wrapped in a list of names and I’d like to enable the user
to click on the name and go to the “show” page of the model.

Any ideas on how to make the id dynamic?


This works when I changed the table reference. There were 2 loops and
as soon as I grabbed the inner loop all was good.

<%= link_to “show”, {:action => “show”, :id => }, {:title => } %>

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