Flowdock
method

defaults

Importance_1
Ruby on Rails latest stable (v4.0.2) - 0 notes - Class: ActionDispatch::Routing::Mapper::Scoping
defaults(defaults = {}) public

Allows you to set default parameters for a route, such as this:

defaults id: 'home' do
  match 'scoped_pages/(:id)', to: 'pages#show'
end

Using this, the :id parameter here will default to ‘home’.

Show source
Register or log in to add new notes.