Show polls with the user's geozone first

This commit is contained in:
decabeza
2021-07-30 11:51:13 +02:00
committed by Javi Martín
parent 1664ebe8eb
commit 25aa77c4c3
4 changed files with 34 additions and 5 deletions

View File

@@ -14,7 +14,7 @@ class PollsController < ApplicationController
def index
@polls = Kaminari.paginate_array(
@polls.created_by_admin.not_budget.send(@current_filter).includes(:geozones).sort_for_list
@polls.created_by_admin.not_budget.send(@current_filter).includes(:geozones).sort_for_list(current_user)
).page(params[:page])
end