允许跳关

dev_course
daiao 5 years ago
parent 77ebf88fde
commit aa76382c5e

@ -56,7 +56,7 @@ class Myshixun < ApplicationRecord
# status:0 可以测评的; 1 正在测评的; 2评测通过的 3未开启的
# 如果都完成,则当前任务为最后一个任务
def current_task games
current_game = games.select{|game| game.status == 1 || game.status == 0}.first
current_game = games.select{|game| game.status == 1 || game.status == 0}.last
if current_game.blank?
current_game = games.last
end

Loading…
Cancel
Save