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