summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorDavisLWebb <davislwebb@ymail.com>2014-04-03 17:56:24 -0400
committerDavisLWebb <davislwebb@ymail.com>2014-04-03 17:56:24 -0400
commit8b3fae332f81b42671bd2a4f332626c75fdeb976 (patch)
tree917b5d74695b69670a75f83f0ba3deeb83e44f07 /app/controllers
parent6289593da4b6ad30c893b61caf4ac142b590710a (diff)
parent0c1583c0b31504dfdbbbec3e6dcc240acb059891 (diff)
Merge branch 'master' of https://github.com/LukeShu/Leaguer
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/tournaments_controller.rb14
1 files changed, 5 insertions, 9 deletions
diff --git a/app/controllers/tournaments_controller.rb b/app/controllers/tournaments_controller.rb
index 9cf3404..4bba997 100644
--- a/app/controllers/tournaments_controller.rb
+++ b/app/controllers/tournaments_controller.rb
@@ -36,12 +36,7 @@ class TournamentsController < ApplicationController
# GET /tournaments/1/edit
def edit
- if params['close_action'] == 'close'
- @tournament.status = 1
- @tournament.save
- @tournament.setup(@tournament)
- redirect_to "/tournaments"
- end
+
end
# POST /tournaments
@@ -96,7 +91,10 @@ class TournamentsController < ApplicationController
format.html {redirect_to @tournament, notice: 'You were\'t a part of this tournament.' }
format.json { render json: "Permission denied", status: :forbidden }
end
- when "open"
+ when "start"
+ @tournament.status = 1
+ @tournament.save
+ @tournament.setup()
respond_to do |format|
if @tournament.setup
format.html { render action: 'show', notice: 'You have joined this tournament.' }
@@ -105,8 +103,6 @@ class TournamentsController < ApplicationController
format.html { render action: 'permission_denied', status: :forbidden }
format.json { render json: "Permission denied", status: :forbidden }
end
- #when "close"
- # TODO
else
respond_to do |format|
format.html { render action: 'show', notice: "Invalid action", status: :unprocessable_entity }