summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authornfoy <nfoy@purdue.edu>2014-04-26 20:57:26 -0400
committernfoy <nfoy@purdue.edu>2014-04-26 20:57:26 -0400
commit31d458e59077340f28955033735f5c433197cb75 (patch)
tree8784a35b5d50f32ce693c0427b277f7238c6d691 /config
parent00f3d70445d7cae0976ec9794e555c52a1765b24 (diff)
parentedcca83c6c251a79afcd83760cf20ebaf00b3b32 (diff)
Merge branch 'master' of https://github.com/LukeShu/leaguer
Diffstat (limited to 'config')
-rw-r--r--config/routes.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/config/routes.rb b/config/routes.rb
index d7807f0..a4df5b4 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,5 +1,4 @@
Leaguer::Application.routes.draw do
- resources :brackets
resources :sessions, only: [:new, :create, :destroy]
@@ -15,6 +14,7 @@ Leaguer::Application.routes.draw do
resources :tournaments do
resources :matches, only: [:index, :show, :update]
+ resources :brackets
end
resource :server, only: [:show, :edit, :update]
@@ -33,6 +33,12 @@ Leaguer::Application.routes.named_routes.module.module_eval do
def match_url(match, options={})
tournament_match_url(match.tournament_stage.tournament, match, options)
end
+ def bracket_path(bracket, options={})
+ tournament_bracket_path(bracket.tournament, bracket, options)
+ end
+ def bracket_url(bracket, options={})
+ tournament_bracket_url(bracket.tournament, bracket, options)
+ end
end
if false