I have a class Document (in a mongodb collection) and persist various sub classes (like Page < Document). Now I do a Document.all()- how do I generate links to the document's edit action pointing to the right controller (PageController for pages) without being verbose about it?
<%= link_to document.title, [:admin, document] %>
points to 'show;, how can I make it point to 'edit' without specifying the controller?