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