实训tpi
This commit is contained in:
parent
8336110787
commit
0fd0081066
|
@ -13,7 +13,8 @@ class Myshixun < ActiveRecord::Base
|
|||
games = self.games
|
||||
current_game = games.select{|game| game.status==1 || game.status==0}.first
|
||||
if current_game.blank?
|
||||
current_game = games.last
|
||||
passed_games = games.select{|game| game.status==2}
|
||||
passed_games.last
|
||||
end
|
||||
return current_game
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue