I am new to rails.
When I generate scaffold for products , in products/index.html i have
this
code
Listing users
Name | |||
---|---|---|---|
<%=h user.name %> | <%= link_to 'Show', user %> | <%= link_to 'Edit', edit_user_path(user) %> | <%= link_to 'Destroy', user, :confirm => 'Are you sure?', :method => :delete %> |
<%= link_to ‘New user’, new_user_path %>
My doubt is in link_to tags,
<%= link_to ‘Show’, user %>
<%= link_to ‘Edit’, edit_user_path(user) %>
<%= link_to ‘New user’, new_user_path %>
Why not show_user_path(user) ? for first link ‘Show’