1 ActionController::Routing::Routes.draw do |map|
2 map.resources :attachments
5 map.resources :permalinks
6 map.resources :comments
10 # The priority is based upon order of creation: first created -> highest priority.
12 # Sample of regular route:
13 # map.connect 'products/:id', :controller => 'catalog', :action => 'view'
14 # Keep in mind you can assign values other than :controller and :action
16 # Sample of named route:
17 # map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
18 # This route can be invoked with purchase_url(:id => product.id)
20 # You can have the root of your site routed by hooking up ''
21 # -- just remember to delete public/index.html.
22 # map.connect '', :controller => "welcome"
24 map.open_id_complete 'session', :controller => "sessions", :action => "create", :requirements => { :method => :get }
27 map.activate '/activate/:activation_code', :controller => 'users', :action => 'activate'
29 map.signup '/signup', :controller => 'users', :action => 'new'
30 map.login '/login', :controller => 'sessions', :action => 'new'
31 map.logout '/logout', :controller => 'sessions', :action => 'destroy'
33 map.index '', :controller => 'issues', :action => 'index'
35 map.date 'dates/:year/:month/:day', :controller => 'issues',
36 :action => 'find_by_date',
37 :month => nil, :day => nil,
38 :requirements => { :year => /\d{4}/, :day => /\d{1,2}/, :month => /\d{1,2}/ }
40 map.nice_permalink_route 'issue/:year/:month/:day/:permalink', :controller => 'issues',
41 :action => 'find_by_permalink',
42 :requirements => { :year => /\d{4}/, :day => /\d{2}/, :month => /\d{2}/ }
44 map.full_permalink_route 'issue/:year/:month/:day/:permalink/:id', :controller => 'issues',
45 :action => 'find_by_permalink_id',
46 :requirements => { :year => /\d{4}/, :day => /\d{2}/, :month => /\d{2}/ }
49 # Allow downloading Web Service WSDL as a file with an extension
50 # instead of a file named 'wsdl'
51 map.connect ':controller/service.wsdl', :action => 'wsdl'
53 # Install the default route as the lowest priority.
54 map.connect ':controller/:action/:id.:format'
55 map.connect ':controller/:action/:id'