fixed a large number of bugs in the software (see wiki) over a days work
[selectricity-live] / config / routes.rb
1 ActionController::Routing::Routes.draw do |map|  
2   # The priority is based upon order of creation: first created -> highest priority.
3   
4   # Sample of regular route:
5   # map.connect 'products/:id', :controller => 'catalog', :action => 'view'
6   # Keep in mind you can assign values other than :controller and :action
7
8   # Sample of named route:
9   # map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
10   # This route can be invoked with purchase_url(:id => product.id)
11
12   # You can have the root of your site routed by hooking up '' 
13   # -- just remember to delete public/index.html.
14   map.connect '', :controller => "front"
15
16   map.connect '/sitealizer/:action', :controller => 'sitealizer' 
17
18   map.connect 'voter/:action',
19               :controller => 'voter',
20               :requirements => { :action => /(review|confirm|authenticate|index|login|reminder|results)/ }
21
22   map.voteopen 'voter/open.:election_id',
23                    :controller => 'voter',
24                    :action => 'index'
25
26   map.votepassword 'voter/:urlpassword',
27                    :controller => 'voter',
28                    :action => 'index'
29
30   map.kiosk_ready 'voter/kiosk_ready/:urlpassword',
31                   :controller => 'voter',
32                   :action => 'kiosk_ready'
33
34   map.connect 'quickvote/:action/:id',
35                :controller => 'quickvote',
36                :requirements => { :action => /(create|add_candidate|sort_candidates|my_quickvotes)/ }
37
38   map.quickaction 'quickvote/:ident/:action',
39                   :controller => 'quickvote',
40                         :requirements => { :action => /(change|confirm|results)/ }
41
42   map.quickvote 'quickvote/:ident',
43                 :controller => 'quickvote', :action => 'index'
44
45   # Allow downloading Web Service WSDL as a file with an extension
46   # instead of a file named 'wsdl'
47   map.connect ':controller/service.wsdl', :action => 'wsdl'
48
49   # The following pertain to caching and accessing Gruff graphs
50   # To make caching easier, add a line like this to config/routes.rb:
51   # map.graph "graph/:action/:id/image.png", :controller => "graph"
52   #
53   # Then reference it with the named route:
54   #   image_tag graph_url(:action => 'show', :id => 42)
55   map.graph "graph/:action/:id/graph.png", :controller => "graph"
56   
57   # Install the default route as the lowest priority.
58   map.connect ':controller/:action/:id.:format'
59   map.connect ':controller/:action/:id'
60 end

Benjamin Mako Hill || Want to submit a patch?