root/config/routes.rb

Revision 8, 1.5 kB (checked in by falcon, 16 years ago)

Tweaks and upgrades, routes/paginate/etc

Line 
1ActionController::Routing::Routes.draw do |map|
2  map.resources :galleries
3
4  # The priority is based upon order of creation: first created -> highest priority.
5
6  # Sample of regular route:
7  #   map.connect 'products/:id', :controller => 'catalog', :action => 'view'
8  # Keep in mind you can assign values other than :controller and :action
9
10  # Sample of named route:
11  #   map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
12  # This route can be invoked with purchase_url(:id => product.id)
13
14  # Sample resource route (maps HTTP verbs to controller actions automatically):
15  #   map.resources :products
16
17  # Sample resource route with options:
18  #   map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get }
19
20  # Sample resource route with sub-resources:
21  #   map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller
22
23  # Sample resource route within a namespace:
24  #   map.namespace :admin do |admin|
25  #     # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb)
26  #     admin.resources :products
27  #   end
28
29  # You can have the root of your site routed with map.root -- just remember to delete public/index.html.
30   map.root :controller => "Main"
31
32  # See how all your routes lay out with "rake routes"
33
34  # Install the default routes as the lowest priority.
35  map.connect ':controller/:action/:id'
36  map.connect ':controller/:action/:id.:format'
37end
Note: See TracBrowser for help on using the browser.