Merge head
[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 => "site", :action => "index"
15  
16   map.connect 'quickvote/:action/:id',
17                :controller => 'quickvote',
18                :requirements => { :action => /(create|add_candidate|sort_candidates|my_quickvotes)/ }
19
20   map.quickaction 'quickvote/:ident/:action',
21                   :controller => 'quickvote',
22                         :requirements => { :action => /(change|confirm|results)/ }
23
24   map.quickvote 'quickvote/:ident',
25                 :controller => 'quickvote', :action => 'index'
26
27   # Allow downloading Web Service WSDL as a file with an extension
28   # instead of a file named 'wsdl'
29   map.connect ':controller/service.wsdl', :action => 'wsdl'
30
31   # The following pertain to caching and accessing Gruff graphs
32   # To make caching easier, add a line like this to config/routes.rb:
33   # map.graph "graph/:action/:id/image.png", :controller => "graph"
34   #
35   # Then reference it with the named route:
36   #   image_tag graph_url(:action => 'show', :id => 42)
37   map.graph "graph/:action/:id/graph.png", :controller => "graph"
38   
39   # Install the default route as the lowest priority.
40   map.connect ':controller/:action/:id.:format'
41   map.connect ':controller/:action/:id'
42 end

Benjamin Mako Hill || Want to submit a patch?