module ActionDispatch::Routing::Mapper::Scoping
def defaults(defaults = {})
end
match 'scoped_pages/(:id)', to: 'pages#show'
defaults id: 'home' do
Allows you to set default parameters for a route, such as this:
def defaults(defaults = {}) @scope = @scope.new(defaults: merge_defaults_scope(@scope[:defaults], defaults)) yield ensure @scope = @scope.parent end