mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 09:57:23 +02:00
110152326-filter_fix
This commit is contained in:
parent
f3d22e0145
commit
f019bf5e0d
1 changed files with 2 additions and 2 deletions
|
@ -11,7 +11,7 @@ class Admin::ContactsController < AdminController
|
|||
end
|
||||
|
||||
@q = Contact.includes(:registrar).search(search_params)
|
||||
@contacts = @q.result.page(params[:page])
|
||||
@contacts = @q.result(distinct: :true).page(params[:page])
|
||||
|
||||
if params[:statuses_contains]
|
||||
contacts = Contact.includes(:registrar).where(
|
||||
|
@ -23,7 +23,7 @@ class Admin::ContactsController < AdminController
|
|||
|
||||
normalize_search_parameters do
|
||||
@q = contacts.search(search_params)
|
||||
@contacts = @q.result.page(params[:page])
|
||||
@contacts = @q.result(distinct: :true).page(params[:page])
|
||||
end
|
||||
|
||||
@contacts = @contacts.per(params[:results_per_page]) if params[:results_per_page].to_i > 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue