|
|
|
@ -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
|
|
|
|
|