diff options
Diffstat (limited to 'config/routes.rb')
-rw-r--r-- | config/routes.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/config/routes.rb b/config/routes.rb index 8c91ee1..f94bd2f 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,3 +1,4 @@ +# -*- Mode: Ruby; Ruby-indent-level: 2; Indent-tabs-mode: nil -*- Leaguer::Application.routes.draw do resources :brackets @@ -17,13 +18,24 @@ Leaguer::Application.routes.draw do #match 'simple_captcha/:id', :to => 'simple_captcha#show', :as => :simple_captcha resources :teams + resources :tournaments do resources :matches, only: [:index, :show, :update] end root to: 'static#homepage' get '/testsvg', to: 'static#test' +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". |