module ActionDispatch::Routing::Mapper::Scoping

def defaults(defaults = {})

Using this, the +:id+ parameter here will default to 'home'.
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