PCqiandao
daiao 5 years ago
parent 751a3e70e5
commit bca9bbbdb8

@ -69,13 +69,13 @@ class Challenge < ApplicationRecord
end end
# 开启挑战 # 开启挑战
def open_game shixun, position def open_game shixun
# 这里的identifier,status是关联了games取了games的identifier,status # 这里的identifier,status是关联了games取了games的identifier,status
identifier = self.identifier identifier = self.identifier
if identifier.present? if identifier.present?
shixun.task_pass || self.status != 3 ? "/tasks/#{identifier}" : "" shixun.task_pass || self.status != 3 ? "/tasks/#{identifier}" : ""
else else
position == 1 ? "/shixuns/#{shixun.identifier}/shixun_exec.json" : "" self.position == 1 ? "/shixuns/#{shixun.identifier}/shixun_exec.json" : ""
end end
end end

Loading…
Cancel
Save