mirror of
https://github.com/internetee/registry.git
synced 2025-07-29 22:16:19 +02:00
Enabled partial search
This commit is contained in:
parent
26cb791586
commit
ee1117021b
5 changed files with 9 additions and 9 deletions
|
@ -11,7 +11,7 @@ module Repp
|
|||
authorize! :check, Epp::Contact
|
||||
records = current_user.registrar.contacts
|
||||
|
||||
q = records.ransack(search_params)
|
||||
q = records.ransack(PartialSearchFormatter.format(search_params))
|
||||
q.sorts = 'created_at desc' if q.sorts.empty?
|
||||
contacts = q.result(distinct: true)
|
||||
|
||||
|
@ -123,7 +123,7 @@ module Repp
|
|||
end
|
||||
|
||||
def search_params
|
||||
index_params.fetch(:q, {})
|
||||
index_params.fetch(:q, {}) || {}
|
||||
end
|
||||
|
||||
def domain_filter_params
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue