instance method
polymorphic_path_for_action
Ruby on Rails edge
Since v4.2.11.3Signature
polymorphic_path_for_action(action, record_or_hash, options)
No documentation comment.
Parameters
-
actionreq -
record_or_hashreq -
optionsreq
Source
# File actionpack/lib/action_dispatch/routing/polymorphic_routes.rb, line 178
def polymorphic_path_for_action(action, record_or_hash, options)
if options.empty? && !(Hash === record_or_hash) && !polymorphic_mapping(record_or_hash)
# What polymorphic_path does with action: as the only option.
HelperMethodBuilder.polymorphic_method(self, record_or_hash, action, :path, options)
else
polymorphic_path(record_or_hash, options.merge(action: action))
end
end
Defined in actionpack/lib/action_dispatch/routing/polymorphic_routes.rb line 178
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Routing::PolymorphicRoutes