1 Merb.logger.info("Compiling routes...")
2 Merb::Router.prepare do |r|
5 r.namespace :admin do |admin|
6 admin.resources :content_nodes
8 admin.resources :orders
9 admin.resources :preferences
10 admin.resources :products
11 admin.resources :promotions
12 admin.resources :questions
13 admin.resources :sections
20 r.match("/login").to(:controller => "Sessions", :action => "create").name(:login)
21 r.match("/logout").to(:controller => "Sessions", :action => "destroy").name(:logout)
22 r.match("/users/activate/:activation_code").to(:controller => "Users", :action => "activate").name(:user_activation)
25 #r.match('/').to(:controller => 'ContentNodes', :action =>'show_by_name', :name => 'home')
26 #r.match('').to(:controller => 'ContentNodes', :action => 'show_by_name', :name => 'home')
28 # Default administration mapping
30 # :controller => 'admin/orders',
33 #r.match('/blog').to(:controller => 'ContentNodes', :action => 'index')
34 #r.match('/blog/section/:section_name').to(:controller => 'ContentNodes', :action => 'list_by_section')
35 #r.match('/blog/:name').to(:controller => 'ContentNodes', :action => 'show_by_name')
37 # map.connect '/store/show_by_tags/*tags',
38 # :controller => 'store',
39 # :action => 'show_by_tags'
41 # For things like /about_us, etc
42 #r.match('/:name').to(:controller => 'ContentNodes', :action => 'show_by_name')