current_task

This commit is contained in:
huang 2017-03-24 10:42:51 +08:00
parent b77ba2b751
commit e8e1a899fe
1 changed files with 1 additions and 1 deletions

View File

@ -10,7 +10,7 @@ class Myshixun < ActiveRecord::Base
# 如果都完成,则当前任务为最后一个任务
def current_task
games = self.games
current_game = games.select{|game| game.status==1 || game.status==1}.first
current_game = games.select{|game| game.status==1 || game.status==0}.first
if current_game.blank?
current_game = games.last
end