The magic method polymorphic_url.
When you call link_to, redirect_toetc., and you do not pass a string or a hash of routing parameters, Rails will eventually call this method.
Active Record ( Active Model) model_name, ActiveMethod:: Name, "" .
(singular_route_key) , . , namespacing, .
@article.class.model_name.singular_route_key #=> 'article'
Rails ('url', 'path' ..) , article_url. ( ), , URL- .