I\'m trying to create a helper method for my admin links. In quite a few views I have the code
<% if current_user %> <%= link_to \"Edit\", edit_model_pa
Rails provides polymorphic routes to handle this problem: http://api.rubyonrails.org/classes/ActionDispatch/Routing/PolymorphicRoutes.html
= link_to "Edit", polymorphic_path(model), :method => :put