summaryrefslogtreecommitdiff
path: root/app/controllers/tournaments_controller.rb
diff options
context:
space:
mode:
authorTomer Kimia <tkimia@purdue.edu>2014-03-07 17:54:11 -0500
committerTomer Kimia <tkimia@purdue.edu>2014-03-07 17:54:11 -0500
commitda284d090e74d790bd80a8e4ed0400eb073e36b6 (patch)
tree21d058fa92ed008f30234f6813dc1d386799e293 /app/controllers/tournaments_controller.rb
parent7e7a0a4a0465142612acd1e0d050cb1b91f93d90 (diff)
tournaments table is better
Diffstat (limited to 'app/controllers/tournaments_controller.rb')
-rw-r--r--app/controllers/tournaments_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/tournaments_controller.rb b/app/controllers/tournaments_controller.rb
index 0807953..7352e8d 100644
--- a/app/controllers/tournaments_controller.rb
+++ b/app/controllers/tournaments_controller.rb
@@ -21,8 +21,7 @@ class TournamentsController < ApplicationController
# GET /tournaments/new
def new
@games = Game.all
- @tournament = Tournament.new(game: Game.find_by_id(params[:game]))
- @tournament.status = 1
+ @tournament = Tournament.new(game: Game.find_by_id(params[:game]))
end
# GET /tournaments/1/edit
@@ -39,6 +38,7 @@ class TournamentsController < ApplicationController
# POST /tournaments.json
def create
@tournament = Tournament.new(tournament_params)
+ @tournament.status = 0
respond_to do |format|
if @tournament.save
@tournament.hosts.push(current_user)