instance method
with_scope_level
Ruby on Rails 3.2.22.5
Since v3.0.20Signature
with_scope_level(kind, resource = parent_resource)
No documentation comment.
Parameters
-
kindreq -
resourceopt = parent_resource
Source
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 1401
def with_scope_level(kind, resource = parent_resource)
old, @scope[:scope_level] = @scope[:scope_level], kind
old_resource, @scope[:scope_level_resource] = @scope[:scope_level_resource], resource
yield
ensure
@scope[:scope_level] = old
@scope[:scope_level_resource] = old_resource
end
Defined in actionpack/lib/action_dispatch/routing/mapper.rb line 1401
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Routing::Mapper::Resources