diff options
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/tournaments_controller.rb | 4 |
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) |