OSDN Git Service

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