changelog shortlog tags changeset manifest revisions annotate raw

config/routes.rb

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