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