For almost all of my objects I put a series of classic REST admin links
in views. For example, for a 'user', I have
<%= link_to "Show", user_path(user) %>
<%= link_to "Edit", edit_user_path(user) %>
<%= link_to "Destroy", user_path(user), :confirm => "Are you sure",
:method => :delete %>
I am tired of writing those links down over and over and look for a way
to DRY it a little bit.
I am thinking about a helper method allowing me to write a simple
<%= admin_links(user) %>
but I don't know how to dynamically write the user_path, edit_user_path
and so on?
An idea anyone?
In advance, thank you very much!