summaryrefslogtreecommitdiff
path: root/config/routes.rb
diff options
context:
space:
mode:
authorAndrewMurrell <amurrel@purdue.edu>2014-04-26 20:25:29 -0400
committerAndrewMurrell <amurrel@purdue.edu>2014-04-26 20:25:29 -0400
commita5a08c542e550c20493d746546a886efe2123434 (patch)
tree506e00c350b51016222140d9f917883bf76cb59b /config/routes.rb
parent7d97ad8ff641c1f5d67706bec053c77ece70b18a (diff)
parent853c307700fa81b924e00bf430c878a3b7029ffe (diff)
Merge branch 'master' of http://github.com/LukeShu/leaguer
Diffstat (limited to 'config/routes.rb')
-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