From 275bc3bd0d39aab0f6ff7a0de19fef148a6eebed Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 1 Jul 2019 15:08:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E5=85=B3=E5=8D=A1=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/challenge.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/challenge.rb b/app/models/challenge.rb index 18b177e1c..e7a382a51 100644 --- a/app/models/challenge.rb +++ b/app/models/challenge.rb @@ -52,7 +52,7 @@ class Challenge < ApplicationRecord # 开启挑战 def open_game user_id, shixun - game = self.games.first + game = self.games.where(user_id: user_id).first if game.present? shixun.task_pass || game.status != 3 ? "/tasks/#{game.identifier}" : "" else