From a5ecdac73da1afaf432965db194dde247349cb6a Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Tue, 23 Jul 2019 21:26:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E9=87=8D=E7=BD=AE=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6=E4=BF=AE=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/shixuns_controller.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index be4448a92..9edb6bb9d 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -830,8 +830,6 @@ private def is_shixun_reset?(games, min_challenges, current_myshixun) # 用户在申请发布之前,是否玩过实训 TODO: 重置的字段应该迁移到myshixuns表比较合适 modify_shixun = ShixunModify.exists?(:myshixun_id => current_myshixun.id, :shixun_id => @shixun.id, :status => 1) - games.size != min_challenges.size || - games.map(&:challenge_id) != min_challenges.map{|challenge| challenge.first} || - modify_shixun + games.size != min_challenges.size || modify_shixun end end