@ -97,12 +97,12 @@ class Challenge < ApplicationRecord
# 关卡用户通关数
def user_passed_count
games.select{|game| game.status == 2}.size
games.where(status: 2).count
end
# 关卡用户正在挑战的人数
def playing_count
games.select{|game| game.status == 0 || game.status == 1}.size
games.where(status: [0, 1]).count
def last_challenge