mirror of
https://github.com/internetee/registry.git
synced 2025-08-02 07:52:04 +02:00
Updated dependency ransack to v4
This commit is contained in:
parent
a78f5b901f
commit
37c16a067d
16 changed files with 139 additions and 36 deletions
|
@ -183,6 +183,14 @@ class Contact < ApplicationRecord
|
|||
#
|
||||
|
||||
class << self
|
||||
def ransackable_associations(auth_object = nil)
|
||||
super
|
||||
end
|
||||
|
||||
def ransackable_attributes(auth_object = nil)
|
||||
super
|
||||
end
|
||||
|
||||
def search_by_query(query)
|
||||
res = search(code_cont: query).result
|
||||
res.reduce([]) { |o, v| o << { id: v[:id], display_key: "#{v.name} (#{v.code})" } }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue