mirror of
https://github.com/internetee/registry.git
synced 2025-07-31 06:56:23 +02:00
Enabled partial search
This commit is contained in:
parent
26cb791586
commit
ee1117021b
5 changed files with 9 additions and 9 deletions
|
@ -13,7 +13,7 @@ module Repp
|
|||
def index
|
||||
authorize! :info, Epp::Domain
|
||||
records = current_user.registrar.domains
|
||||
q = records.ransack(search_params)
|
||||
q = records.ransack(PartialSearchFormatter.format(search_params))
|
||||
q.sorts = ['valid_to asc', 'created_at desc'] if q.sorts.empty?
|
||||
# use distinct: false here due to ransack bug:
|
||||
# https://github.com/activerecord-hackery/ransack/issues/429
|
||||
|
@ -244,7 +244,7 @@ module Repp
|
|||
end
|
||||
|
||||
def search_params
|
||||
index_params.fetch(:q, {})
|
||||
index_params.fetch(:q, {}) || {}
|
||||
end
|
||||
|
||||
def update_params
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue