From da284d090e74d790bd80a8e4ed0400eb073e36b6 Mon Sep 17 00:00:00 2001 From: Tomer Kimia Date: Fri, 7 Mar 2014 17:54:11 -0500 Subject: tournaments table is better --- app/controllers/tournaments_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/controllers') 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) -- cgit v1.2.3-2-g168b