实训tpi的当前任务

This commit is contained in:
daiao 2017-04-01 10:50:36 +08:00
parent 0fd0081066
commit b6933af0c2
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ class Myshixun < ActiveRecord::Base
current_game = games.select{|game| game.status==1 || game.status==0}.first
if current_game.blank?
passed_games = games.select{|game| game.status==2}
passed_games.last
current_game = passed_games.last
end
return current_game
end