app/models/fields/custom_field.rb
# Adds custom field translation for Ransack
Adds custom field translation for Ransack
Adds custom field translation for Ransack
def add_ransack_translation
    I18n.backend.store_translations(Setting.locale.to_sym,
                                    ransack: { attributes: { klass.model_name.singular => { name => label } } })
  end
def add_ransack_translation I18n . backend . store_translations ( Setting . locale . to_sym , ransack : { attributes : { klass . model_name . singular => { name => label } } } ) end
Adds custom field translation for Ransack
Adds custom field translation for Ransack
# Reset Ransack cache # Ransack::Helpers::FormBuilder.cached_searchable_attributes_for_base = {}