routes.rb
1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
ActionController::Routing::Routes.draw do |map|
  # The priority is based upon order of creation: first created -> highest priority.
  
  # Sample of regular route:
  # map.connect 'products/:id', :controller => 'catalog', :action => 'view'
  # Keep in mind you can assign values other than :controller and :action
  # Sample of named route:
  # map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
  # This route can be invoked with purchase_url(:id => product.id)
  # You can have the root of your site routed by hooking up '' 
  # -- just remember to delete public/index.html.
  map.connect '', :controller => "home"
  # documentation browser
  map.connect 'doc', :controller => 'doc'
  # user account controller
  map.connect 'account/:action', :controller => 'account'
  # profile customization
  map.connect 'customize/:profile/edit_template/:action/:id', :controller => 'edit_template'
  # content administration
  map.comatose_admin 'cms/:profile'
  # administrative tasks for a virtual community
  map.connect 'admin', :controller => 'admin_panel', :action => 'index'
  map.connect 'admin/:controller/:action/:id'
  # *content viewing*
  # XXX this route must come last so other tasks have priority over it.
  map.connect ':profile/*page', :controller => 'content_viewer', :action => 'view_page'
  # no default route
  # map.connect ':controller/:action/:id'
end