1 ActionController::Routing::Routes.draw do |map|
2 # The priority is based upon order of creation: first created -> highest priority.
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
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)
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 => "welcome"
16 map.connect '', :controller => 'songs', :action => 'index'
17 map.resources :songs, :member => {:set_song_title => :put, :set_song_artist => :put}
18 map.resources :shows, :member => {:reorder => :put, :set_show_title => :put}
19 map.resources :usages, :collection => {:delete => :delete}
20 map.resources :users, :sessions
23 map.with_options(:controller => 'slingshot_sync') do |sync|
24 sync.up 'sync/up', :action => 'up'
25 sync.down 'sync/down', :action => 'down'
26 sync.log 'sync/log', :action => 'log'
29 # Allow downloading Web Service WSDL as a file with an extension
30 # instead of a file named 'wsdl'
31 # map.connect ':controller/service.wsdl', :action => 'wsdl'
33 # Install the default route as the lowest priority.
34 map.connect ':controller/:action/:id.:format'
35 map.connect ':controller/:action/:id'