2005-02-14 20:45:35 -05:00
|
|
|
ActionController::Routing::Routes.draw do |map|
|
|
|
|
# The priority is based upon order of creation: first created -> highest priority.
|
|
|
|
|
2006-03-20 01:20:18 -05:00
|
|
|
# Sample of regular route:
|
2005-02-14 20:45:35 -05:00
|
|
|
# map.connect 'products/:id', :controller => 'catalog', :action => 'view'
|
|
|
|
# Keep in mind you can assign values other than :controller and :action
|
2005-02-20 05:55:08 -05:00
|
|
|
|
2006-03-20 01:20:18 -05:00
|
|
|
# Sample of named route:
|
|
|
|
# map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
|
|
|
|
# This route can be invoked with purchase_url(:id => product.id)
|
|
|
|
|
2005-03-20 18:39:07 -05:00
|
|
|
# You can have the root of your site routed by hooking up ''
|
|
|
|
# -- just remember to delete public/index.html.
|
|
|
|
# map.connect '', :controller => "welcome"
|
|
|
|
|
2005-02-20 05:55:08 -05:00
|
|
|
# Allow downloading Web Service WSDL as a file with an extension
|
|
|
|
# instead of a file named 'wsdl'
|
|
|
|
map.connect ':controller/service.wsdl', :action => 'wsdl'
|
2005-03-20 18:39:07 -05:00
|
|
|
|
2005-02-14 20:45:35 -05:00
|
|
|
# Install the default route as the lowest priority.
|
|
|
|
map.connect ':controller/:action/:id'
|
|
|
|
end
|