polymorphic_url(record_or_hash_or_array, options = {})
Instance Public methods
Constructs a call to a named RESTful route for the given record and returns
the resulting URL string. For example:
# calls post_url(post)
polymorphic_url(post) # => "http://example.com/posts/1"
polymorphic_url([blog, post]) # => "http://example.com/blogs/1/posts/1"
polymorphic_url([:admin, blog, post]) # => "http://example.com/admin/blogs/1/posts/1"
polymorphic_url([user, :blog, post]) # => "