instance method
new
Ruby on Rails 7.1.6
Since v3.0.20Signature
new(&block)
No documentation comment.
Parameters
-
blockblock
Source
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 1585
def new(&block)
unless resource_scope?
raise ArgumentError, "can't use new outside resource(s) scope"
end
with_scope_level(:new) do
path_scope(parent_resource.new_scope(action_path(:new)), &block)
end
end
Defined in actionpack/lib/action_dispatch/routing/mapper.rb line 1585
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Routing::Mapper::Resources