summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-03-06 22:40:14 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-03-06 22:40:14 -0500
commit7f9720bf101e0c8ef3d2869b76a1fae098f4f3ee (patch)
tree8a56846b5b2f538af3e60aa5938a66928d5405f4 /app/controllers
parentf959591c62d7e66454f676d9c2a9abdd6fac3a7f (diff)
parent3ce5876375cbb3057ffc96e2886ba57cbd875dc9 (diff)
Merge branch 'master' of github.com:LukeShu/leaguer
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/tournaments_controller.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/app/controllers/tournaments_controller.rb b/app/controllers/tournaments_controller.rb
index 7c93346..5bb9bf8 100644
--- a/app/controllers/tournaments_controller.rb
+++ b/app/controllers/tournaments_controller.rb
@@ -13,8 +13,10 @@ class TournamentsController < ApplicationController
# GET /tournaments/1
# GET /tournaments/1.json
def show
- unless @tournament.status
- redirect_to tournament_matches_page(@tournament)
+ case @tournament.status
+ when 0
+ when 1..2
+ redirect_to "/tournaments/" + @tournament.id.to_s + "/matches" #tournament_matches_page(@tournament)
end
end
@@ -27,6 +29,11 @@ class TournamentsController < ApplicationController
# GET /tournaments/1/edit
def edit
+ if params['close_action'] == 'close'
+ @tournament.status = 1
+ @tournament.save
+ redirect_to "/tournaments"
+ end
end
# POST /tournaments