changelog shortlog tags changeset manifest revisions annotate raw

config/routes.rb

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