changelog shortlog tags changeset manifest revisions annotate raw

config/routes.rb

changeset 10: c7be8325050f
parent:5cf82beef889
child:755229281e85
author: moriq@moriq.com
date: Mon Mar 10 03:24:46 2008 +0900 (16 years ago)
permissions: -rw-r--r--
description: add scaffold order.
1ActionController::Routing::Routes.draw do |map|
2 map.resources :orders
3
4 map.resources :products
5
6 map.resources :users
7
8 map.resource :session
9
10 # The priority is based upon order of creation: first created -> highest priority.
11
12 # Sample of regular route:
13 # map.connect 'products/:id', :controller => 'catalog', :action => 'view'
14 # Keep in mind you can assign values other than :controller and :action
15
16 # Sample of named route:
17 # map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
18 # This route can be invoked with purchase_url(:id => product.id)
19
20 # Sample resource route (maps HTTP verbs to controller actions automatically):
21 # map.resources :products
22
23 # Sample resource route with options:
24 # map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get }
25
26 # Sample resource route with sub-resources:
27 # map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller
28
29 # Sample resource route within a namespace:
30 # map.namespace :admin do |admin|
31 # # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb)
32 # admin.resources :products
33 # end
34
35 # You can have the root of your site routed with map.root -- just remember to delete public/index.html.
36 map.root :controller => "home"
37
38 # See how all your routes lay out with "rake routes"
39
40 # Install the default routes as the lowest priority.
41 map.connect ':controller/:action/:id'
42 map.connect ':controller/:action/:id.:format'
43end