From 143fe570a195a7ca5957692cb3afbf788066c917 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 17 Oct 2017 09:31:06 +0800 Subject: [PATCH] =?UTF-8?q?html=E5=AE=9E=E8=AE=AD=EF=BC=8C=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E8=AF=84=E6=B5=8B=E5=90=8E=EF=BC=8C=E8=BF=98=E6=98=AF?= =?UTF-8?q?=E4=B8=80=E7=89=87=E7=99=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/contests_controller.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/controllers/contests_controller.rb b/app/controllers/contests_controller.rb index e68c232f7..86862cc53 100644 --- a/app/controllers/contests_controller.rb +++ b/app/controllers/contests_controller.rb @@ -92,10 +92,7 @@ class ContestsController < ApplicationController end def create - @contest = Contest.new - @contest.name = params[:contest][:name] - params[:contest][:is_public] ? @contest.is_public = 1 : @contest.is_public = 0 - @contest.user_id = User.current.id + if @contest && @contest.save #unless User.current.admin? member = ContestMember.new(:user_id => User.current.id)