Assigning Show method to a field on Index/list views


I'm still very new to learning Rails (I'm better with Grails).

On the Index/List views, how can I assign he Show method to a field
in the table(making that particular table field the "clickable" link
to the associated Show view) , rather than display the link_to Show
view as a separate text link?

I know it's something I have to set in the <td> tag for that field:
<%=h table.field_name %>
But I'm not quite sure how...

Thank you!

Colleen Robledo

Try <%= link_to object.field_name, :action => 'show', :id =>

That should give you the field text as the link to the show action for
that object.


Thanks so much! It worked!