diff --git a/app/controllers/member_counselors_controller.rb b/app/controllers/member_counselors_controller.rb index 1a888a1..9cfce38 100644 --- a/app/controllers/member_counselors_controller.rb +++ b/app/controllers/member_counselors_controller.rb @@ -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,