instance method
namespace
Ruby on Rails 8.1.2
Since v3.0.20Signature
namespace(name, deprecated_options = nil, as: DEFAULT, path: DEFAULT, shallow_path: DEFAULT, shallow_prefix: DEFAULT, **options, &block)
See ActionDispatch::Routing::Mapper::Scoping#namespace.
Parameters
-
namereq -
deprecated_optionsopt = nil -
askey = DEFAULT -
pathkey = DEFAULT -
shallow_pathkey = DEFAULT -
shallow_prefixkey = DEFAULT -
optionskeyrest -
blockblock
Source
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 1775
def namespace(name, deprecated_options = nil, as: DEFAULT, path: DEFAULT, shallow_path: DEFAULT, shallow_prefix: DEFAULT, **options, &block)
if resource_scope?
nested { super }
else
super
end
end
Defined in actionpack/lib/action_dispatch/routing/mapper.rb line 1775
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Routing::Mapper::Resources