| Module | Spec::Rails::Example::RoutingHelpers |
| In: |
lib/spec/rails/example/routing_helpers.rb
|
Uses ActionController::Routing::Routes to parse an incoming path so the parameters it generates can be checked
Note that this method is obsoleted by the route_to matcher.
params_from(:get, '/registrations/1/edit')
=> :controller => 'registrations', :action => 'edit', :id => '1'
Uses ActionController::Routing::Routes to generate the correct route for a given set of options.
route_for(:controller => 'registrations', :action => 'edit', :id => '1')
=> '/registrations/1/edit'
route_for(:controller => 'registrations', :action => 'create')
=> {:path => "/registrations", :method => :post}