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.signup '/signup', :controller => 'users', :action => 'new'
28 map.login '/login', :controller => 'sessions', :action => 'new'
29 map.logout '/logout', :controller => 'sessions', :action => 'destroy'
31 map.index '', :controller => 'issues', :action => 'index'
33 map.date 'dates/:year/:month/:day', :controller => 'issues',
34 :action => 'find_by_date',
35 :month => nil, :day => nil,
36 :requirements => { :year => /\d{4}/, :day => /\d{1,2}/, :month => /\d{1,2}/ }
38 map.nice_permalink_route 'issue/:year/:month/:day/:permalink', :controller => 'issues',
39 :action => 'find_by_permalink',
40 :requirements => { :year => /\d{4}/, :day => /\d{2}/, :month => /\d{2}/ }
42 map.full_permalink_route 'issue/:year/:month/:day/:permalink/:id', :controller => 'issues',
43 :action => 'find_by_permalink_id',
44 :requirements => { :year => /\d{4}/, :day => /\d{2}/, :month => /\d{2}/ }
47 # Allow downloading Web Service WSDL as a file with an extension
48 # instead of a file named 'wsdl'
49 map.connect ':controller/service.wsdl', :action => 'wsdl'
51 # Install the default route as the lowest priority.
52 map.connect ':controller/:action/:id.:format'
53 map.connect ':controller/:action/:id'