Skip to content

Instantly share code, notes, and snippets.

@abloom
Created June 9, 2009 14:07
Show Gist options
  • Save abloom/126528 to your computer and use it in GitHub Desktop.
Save abloom/126528 to your computer and use it in GitHub Desktop.
ActionController::Routing::Routes.draw do |map|
map.resources :fans
map.resources :league_players
map.logout '/logout', :controller => 'sessions', :action => 'destroy'
map.login '/login', :controller => 'sessions', :action => 'new'
map.check '/check', :controller => 'sessions', :action => 'create'
map.resource :session
map.with_options(:path_prefix => ":slug", :name_prefix => "league_") do |slug|
slug.root :controller => "teams", :action => "show"
slug.resources :players
slug.resources :leagues
slug.resources :games
slug.resources :admins
slug.resources :users
slug.resources :game_players
end
map.register '/register', :controller => 'users', :action => 'create'
map.signup '/signup', :controller => 'users', :action => 'new'
map.resources :field_positions
map.resources :pictures
map.resources :game_players
map.resources :weather_conditions
map.resources :game_types
map.resources :outcomes
map.resources :games
map.resources :location_types
map.resources :sponsors
map.resources :locations
map.resources :levels
map.resources :leagues
map.resources :player_types
map.resources :players
map.resources :age_groups
map.resources :teams
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