OSDN Git Service

SEO対策
[elecoma/elecoma.git] / config / routes.rb
1 ActionController::Routing::Routes.draw do |map|
2
3   map.namespace :admin do |admin|
4     admin.resources :admin_users
5     admin.resources :authorities
6     admin.resources :new_informations
7     admin.resources :recommend_products, :collection => {:product_search => [:get]}
8     admin.resources :questionnaires
9     admin.resources :campaigns, :member => {:campaign_design => [:get]}
10     admin.resources :shops, :only => [:destroy, :index]
11     admin.resources :mail_magazines, :collection => {:history => [:get], :search => [:get]}
12     admin.resources :mail_magazine_templates
13     admin.resources :features
14     admin.resources :feature_products, :collection => {:product_search => [:get]}
15     admin.resources :mobile_devices, :collection => {:search => [:get]}
16     admin.resources :customers, :collection => {:get_address => [:get], :search => [:get]}
17     admin.resources :orders, :collection => {:get_address => [:get], :search => [:get]}, :member => {:edit => [:get, :put]}
18     admin.resources :order_statuses
19     admin.resources :products, :collection => {:search => [:get], :actual_count_index => [:get], :actual_count_search => [:get]}
20     admin.resources :product_styles
21     admin.resources :categories
22     admin.resources :styles
23     admin.resources :style_categories
24     admin.resources :return_items, :collection => {:search => [:get], :history => [:get], :history_search => [:get], :new_csv => [:get], :csv_index => [:get], :csv => [:get]}
25   end
26
27   # The priority is based upon order of creation: first created -> highest priority.
28
29   # Sample of regular route:
30   #   map.connect 'products/:id', :controller => 'catalog', :action => 'view'
31   # Keep in mind you can assign values other than :controller and :action
32
33   # Sample of named route:
34   #   map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
35   # This route can be invoked with purchase_url(:id => product.id)
36
37   # Sample resource route (maps HTTP verbs to controller actions automatically):
38   #   map.resources :products
39
40   # Sample resource route with options:
41   #   map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get }
42
43   # Sample resource route with sub-resources:
44   #   map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller
45
46   # Sample resource route with more complex sub-resources
47   #   map.resources :products do |products|
48   #     products.resources :comments
49   #     products.resources :sales, :collection => { :recent => :get }
50   #   end
51
52   # Sample resource route within a namespace:
53   #   map.namespace :admin do |admin|
54   #     # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb)
55   #     admin.resources :products
56   #   end
57
58   # You can have the root of your site routed with map.root -- just remember to delete public/index.html.
59   # map.root :controller => "welcome"
60   map.root :controller => 'portal', :action => 'show'
61
62   # See how all your routes lay out with "rake routes"
63
64   # Install the default routes as the lowest priority.
65   map.connect 'products/category/:category_id', :controller => 'products', :action => 'index'
66   map.connect 'products/category/:category_id/order/:order', :controller => 'products', :action => 'index'
67   map.connect 'products/show/:id/category/:category_id', :controller => 'products', :action => 'show'
68   map.connect 'image_resource/:action/:id/image.jpg', :controller => 'image_resource'
69
70   map.connect 'admin/', :controller => '/admin/home', :action => 'index'
71
72   map.connect 'campaigns/complete/:id', :controller => 'campaigns', :action => 'complete'
73   map.connect 'campaigns/:dir_name', :controller => 'campaigns', :action => 'show', :requirements => {:dir_name => /.*/ }
74   map.connect 'accounts/activate/:activation_key', :controller => 'accounts', :action => 'activate'
75   map.connect 'features/:dir_name', :controller => 'features', :action => 'show', :requirements => {:dir_name => /.*/ }
76
77   # cart
78   map.connect 'cart', :controller => 'cart', :action => 'show'
79
80   # my page
81   map.connect 'accounts', :controller => 'accounts', :action => 'history'
82
83   # javascript
84   map.js 'js/:action.js', :controller => 'javascript'
85
86   map.connect ':controller/:action/:id'
87   map.connect ':controller/:action/:id.:format'
88 end