instance method
resource_scope
Ruby on Rails 6.0.6
Since v3.0.20 PrivateSignature
resource_scope(resource)
No documentation comment.
Parameters
-
resourcereq
Source
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 1741
def resource_scope(resource)
@scope = @scope.new(scope_level_resource: resource)
controller(resource.resource_scope) { yield }
ensure
@scope = @scope.parent
end
Defined in actionpack/lib/action_dispatch/routing/mapper.rb line 1741
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Routing::Mapper::Resources