diff --git a/app/models/challenge.rb b/app/models/challenge.rb index 44cd8574c..38aa2812a 100644 --- a/app/models/challenge.rb +++ b/app/models/challenge.rb @@ -69,13 +69,13 @@ class Challenge < ApplicationRecord end # 开启挑战 - def open_game shixun, position + def open_game shixun # 这里的identifier,status是关联了games取了games的identifier,status identifier = self.identifier if identifier.present? shixun.task_pass || self.status != 3 ? "/tasks/#{identifier}" : "" else - position == 1 ? "/shixuns/#{shixun.identifier}/shixun_exec.json" : "" + self.position == 1 ? "/shixuns/#{shixun.identifier}/shixun_exec.json" : "" end end