If I have a resource called 'assets' then I get for free a bunch of
helpers, like
assets_path
new_asset_path
and so forth, right?
I would like to be able to create a call to one of these on the fly when
I only find out the name of the resource at run time. For example I
would like to do this:
"Polymorphic URL helpers are methods for smart resolution to a named
route call when given an Active Record model instance. They are to be
used in combination with ActionController::Resources.
These methods are useful when you want to generate correct URL or path
to a RESTful resource without having to know the exact type of the
record in question.
Nested resources and/or namespaces are also supported, as illustrated in
the example: