Created
July 2, 2010 12:37
-
-
Save onlymejosh/461298 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ActionController::Routing::Routes.draw do |map| | |
map.resources :users, :collection => {:login => :get, :logout => :get, :create => :get} | |
# The priority is based upon order of creation: first created -> highest priority. | |
map.resources :completed | |
map.resources :projects, :has_many => :presentations | |
map.resources :presentations, :has_one => :videos | |
map.resources :presentations, :has_one => :keynotes | |
map.resources :slides, :collection => { :times => :put} | |
# map.root :controller => "projects" | |
map.with_options :controller => 'contact' do |contact| | |
contact.contact '/contact', | |
:action => 'index', | |
:conditions => { :method => :get } | |
contact.contact '/contact', | |
:action => 'create', | |
:conditions => { :method => :post } | |
end | |
map.presentation '/:id/:title', :controller => 'presentations', :action => 'display' | |
map.presentation '/:id', :controller => 'presentations', :action => 'display' | |
map.connect ':controller/:action/:id' | |
map.connect ':controller/:action/:id.:format' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment