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