1 ActionController::Routing::Routes.draw do |map|
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]}
27 # The priority is based upon order of creation: first created -> highest priority.
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
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)
37 # Sample resource route (maps HTTP verbs to controller actions automatically):
38 # map.resources :products
40 # Sample resource route with options:
41 # map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get }
43 # Sample resource route with sub-resources:
44 # map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller
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 }
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
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'
62 # See how all your routes lay out with "rake routes"
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'
70 map.connect 'admin/', :controller => '/admin/home', :action => 'index'
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 => /.*/ }
78 map.connect 'cart', :controller => 'cart', :action => 'show'
81 map.connect 'accounts', :controller => 'accounts', :action => 'history'
84 map.js 'js/:action.js', :controller => 'javascript'
86 map.connect ':controller/:action/:id'
87 map.connect ':controller/:action/:id.:format'