1 ActionController::Routing::Routes.draw do |map|
12 map.resources :locations
16 # The priority is based upon order of creation: first created -> highest priority.
18 # Sample of regular route:
19 # map.connect 'products/:id', :controller => 'catalog', :action => 'view'
20 # Keep in mind you can assign values other than :controller and :action
22 # Sample of named route:
23 # map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
24 # This route can be invoked with purchase_url(:id => product.id)
26 # Sample resource route (maps HTTP verbs to controller actions automatically):
27 # map.resources :products
29 # Sample resource route with options:
30 # map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get }
32 # Sample resource route with sub-resources:
33 # map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller
35 # Sample resource route with more complex sub-resources
36 # map.resources :products do |products|
37 # products.resources :comments
38 # products.resources :sales, :collection => { :recent => :get }
41 # Sample resource route within a namespace:
42 # map.namespace :admin do |admin|
43 # # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb)
44 # admin.resources :products
47 # You can have the root of your site routed with map.root -- just remember to delete public/index.html.
48 map.root :controller => "welcome"
50 # See how all your routes lay out with "rake routes"
52 # Install the default routes as the lowest priority.
53 # Note: These default routes make all actions in every controller accessible via GET requests. You should
54 # consider removing or commenting them out if you're using named routes and resources.
55 map.connect ':controller/:action/:id'
56 map.connect ':controller/:action/:id.:format'