instance method
path_for_action
Ruby on Rails 3.0.20
Since v3.0.20Signature
path_for_action(action, path)
No documentation comment.
Parameters
-
actionreq -
pathreq
Source
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 1297
def path_for_action(action, path)
prefix = shallow_scoping? ?
"#{@scope[:shallow_path]}/#{parent_resource.path}/:id" : @scope[:path]
path = if canonical_action?(action, path.blank?)
prefix.to_s
else
"#{prefix}/#{action_path(action, path)}"
end
end
Defined in actionpack/lib/action_dispatch/routing/mapper.rb line 1297
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Routing::Mapper::Resources