diff options
Diffstat (limited to 'config/routes.rb')
-rw-r--r-- | config/routes.rb | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/config/routes.rb b/config/routes.rb index 262a156..5d53c0e 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,24 +1,43 @@ Leaguer::Application.routes.draw do resources :brackets - resources :sessions + resources :sessions, only: [:new, :create, :destroy] resources :users resources :games - resources :tournaments - resources :pms resources :alerts resources :teams - resources :matches + resources :tournaments do + resources :matches, only: [:index, :show, :update] + end + + resource :server, only: [:show, :edit, :update] + + root to: 'static#homepage' + + get '/testsvg', to: 'static#test' + + get '/search', to: 'search#go' - resources :servers +end + + +Leaguer::Application.routes.named_routes.module.module_eval do + def match_path(match, options={}) + tournament_match_path(match.tournament_stage.tournament, match, options) + end + def match_url(match, options={}) + tournament_match_url(match.tournament_stage.tournament, match, options) + end +end +if false # The priority is based upon order of creation: first created -> highest priority. # See how all your routes lay out with "rake routes". |