public Method

Route.parameter_shell

A route’s parameter shell contains parameter values that are not in the route’s path, but should be placed in the recognized hash.

For example, +{:controller => ‘pages’, :action => ‘show’} is the shell for the route:

map.connect '/page/:id', :controller => 'pages', :action => 'show', :id => /\d+/

Source Code

# File action_controller/routing/route.rb, line 177
def parameter_shell
  @parameter_shell ||= returning({}) do |shell|
    requirements.each do |key, requirement|
      shell[key] = requirement unless requirement.is_a? Regexp
    end
  end
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.