small fix

This commit is contained in:
Harry Bomrah 2017-08-21 16:30:50 +08:00
parent e14923b47c
commit 032a17b9b6
1 changed files with 2 additions and 2 deletions

View File

@ -38,9 +38,9 @@ class MemberCounselorsController < CUserController
files = [] files = []
city = HpsCity.find(params[:city_id]) city = HpsCity.find(params[:city_id])
if !params[:type].present? || params[:type] == "proposals" if !params[:type].present? || params[:type] == "proposals"
hpsfiles = HpsFile.where(:hps_member_id.in => members).order_by([:year, :desc],[:created_at, :desc]).page(params[:page]).per(10) hpsfiles = HpsFile.where(:hps_city_id => city.id).order_by([:year, :desc],[:created_at, :desc]).page(params[:page]).per(10)
elsif params[:type] == "results" elsif params[:type] == "results"
hpsfiles = HpsResult.where(:hps_member_id.in => members).order_by([:year, :desc],[:created_at, :desc]).page(params[:page]).per(10) hpsfiles = HpsResult.where(:hps_city_id => city.id).order_by([:year, :desc],[:created_at, :desc]).page(params[:page]).per(10)
end end
hpsfiles.each do |file| hpsfiles.each do |file|
files << { files << {