small fix
This commit is contained in:
parent
032a17b9b6
commit
4b901a50e7
|
@ -38,9 +38,9 @@ class MemberCounselorsController < CUserController
|
|||
files = []
|
||||
city = HpsCity.find(params[:city_id])
|
||||
if !params[:type].present? || params[:type] == "proposals"
|
||||
hpsfiles = HpsFile.where(:hps_city_id => city.id).order_by([:year, :desc],[:created_at, :desc]).page(params[:page]).per(10)
|
||||
hpsfiles = HpsFile.where(:hps_city_id => city.id, :hps_member_id.in => members).order_by([:year, :desc],[:created_at, :desc]).page(params[:page]).per(10)
|
||||
elsif params[:type] == "results"
|
||||
hpsfiles = HpsResult.where(:hps_city_id => city.id).order_by([:year, :desc],[:created_at, :desc]).page(params[:page]).per(10)
|
||||
hpsfiles = HpsResult.where(:hps_city_id => city.id, :hps_member_id.in => members).order_by([:year, :desc],[:created_at, :desc]).page(params[:page]).per(10)
|
||||
end
|
||||
hpsfiles.each do |file|
|
||||
files << {
|
||||
|
|
Loading…
Reference in New Issue