Skip to content

Instantly share code, notes, and snippets.

@biagidp
Created February 22, 2011 22:02
Show Gist options
  • Save biagidp/839519 to your computer and use it in GitHub Desktop.
Save biagidp/839519 to your computer and use it in GitHub Desktop.
ActionController::Routing::Routes.draw do |map|
map.resources :user_sessions
map.resources :sites, :users
map.resources :sites, :member => { :encode => :get, :decode => :get }
map.login "login", :controller => "user_sessions", :action => "new"
map.logout "logout", :controller => "user_sessions", :action => "destroy"
map.root :login
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