How to add view option in Ruby? -
i have allowed admins delete user having
link_to("delete", admin_path(resource), :confirm => "do want delete item?", :method => :delete)
how add option view, want view item?
rails applications typically respond various actions based on http verb, routes method controller. comments point out correct code link default show method controller:
link_to("view", resource_path(resource))
however, have have method written retrieve , display contents of resource, including template display fields, etc.
Comments
Post a Comment