Fixed ransack admin search

This commit is contained in:
Sergei Tsoganov 2023-04-06 13:54:03 +03:00
parent ae384e4e64
commit aa8d8c35e8
9 changed files with 34 additions and 20 deletions

View file

@ -51,6 +51,14 @@ class Registrar < ApplicationRecord # rubocop:disable Metrics/ClassLength
self.ignored_columns = %w[legacy_id]
class << self
def ransackable_associations(auth_object = nil)
super
end
def ransackable_attributes(auth_object = nil)
authorizable_ransackable_attributes
end
def ordered
order(name: :asc)
end