polymorphic_path(record_or_hash_or_array, options = {})
public
Returns the path component of a URL for the given record. It uses polymorphic_url
with routing_type: :path.
# File actionpack/lib/action_dispatch/routing/polymorphic_routes.rb, line 123
def polymorphic_path(record_or_hash_or_array, options = {})
if Hash === record_or_hash_or_array
options = record_or_hash_or_array.merge(options)
record = options.delete :id
return polymorphic_path record, options
end
opts = options.dup
action = opts.delete :action
type = :path
HelperMethodBuilder.polymorphic_method self,
record_or_hash_or_array,
action,
type,
opts
end