instance method
nested_options
Ruby on Rails 3.0.20
Since v3.0.20Signature
nested_options()
No documentation comment.
Source
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 1274
def nested_options
{}.tap do |options|
options[:as] = parent_resource.member_name
options[:constraints] = { "#{parent_resource.singular}_id".to_sym => id_constraint } if id_constraint?
end
end
Defined in actionpack/lib/action_dispatch/routing/mapper.rb line 1274
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Routing::Mapper::Resources