counting fixed
This commit is contained in:
parent
56cfee7841
commit
c3f317e282
|
@ -8,7 +8,8 @@ class MemberCounselorsController < CUserController
|
|||
total = 0
|
||||
idx = idx + 1
|
||||
schools = city.hps_schools.collect do |school|
|
||||
count = HpsMember.where(:hps_school_id => school.id.to_s).count
|
||||
members = HpsMember.where(:hps_school_id => school.id.to_s).pluck(:id)
|
||||
count = HpsFile.where(:hps_member_id.in => members).count
|
||||
total = count + total
|
||||
{
|
||||
"name" => school.name,
|
||||
|
|
Loading…
Reference in New Issue