From 2b8dd79863d13eaa78249347af65a49457a6291b Mon Sep 17 00:00:00 2001 From: aaronskiba Date: Thu, 9 Jan 2025 10:28:08 -0700 Subject: [PATCH] Ensure `filter_admin`param is consistently passed - Updated the `index` action within `Paginable UsersController` to include `filter_admin` in the `query_params` for `paginable_renderise`. - This addresses the issue where `filter_admin` was sometimes `nil` within the controller, even when it was set to '1' in the browser (https://github.com/portagenetwork/roadmap/issues/941). --- app/controllers/paginable/users_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/paginable/users_controller.rb b/app/controllers/paginable/users_controller.rb index 288fd0821..caa086ea9 100644 --- a/app/controllers/paginable/users_controller.rb +++ b/app/controllers/paginable/users_controller.rb @@ -25,7 +25,7 @@ def index paginable_renderise( partial: 'index', scope: scope, - query_params: { sort_field: 'users.surname', sort_direction: :asc }, + query_params: { sort_field: 'users.surname', sort_direction: :asc, filter_admin: params[:filter_admin] }, format: :json, view_all: !current_user.can_super_admin? )