summaryrefslogtreecommitdiff
path: root/config/routes.rb
diff options
context:
space:
mode:
authorguntasgrewal <guntasgrewal@gmail.com>2014-04-26 20:35:55 -0400
committerguntasgrewal <guntasgrewal@gmail.com>2014-04-26 20:35:55 -0400
commit1d24cb050f198e9c8bec8dd014de203d889ab56a (patch)
tree9f10e7a5be75d7ffb4cb829d3738a144b5250b9b /config/routes.rb
parent2d0fe1a4197e70cb99f4285a8b32a645914d8beb (diff)
parentdfbbe46fdcca392b3dec703cf347d1b1d57ca94f (diff)
Merge branch 'master' of https://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