From fa922bd5a353fb8a4414a6b5ebcf0f3c41aeab77 Mon Sep 17 00:00:00 2001 From: Leos Stejskal Date: Mon, 30 Oct 2023 14:43:05 +0100 Subject: [PATCH] Description settings search --- app/models/setting.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/models/setting.rb b/app/models/setting.rb index 84ba764e21b..4d6e70673c3 100644 --- a/app/models/setting.rb +++ b/app/models/setting.rb @@ -56,6 +56,7 @@ def validate(record) scoped_search :on => :id, :complete_enabled => false, :only_explicit => true, :validator => ScopedSearch::Validators::INTEGER scoped_search on: :name, complete_value: :true, operators: ['=', '~'] + scoped_search on: :description, operators: ['~'], ext_method: :search_description delegate :settings_type, :encrypted, :encrypted?, :default, to: :setting_definition, allow_nil: true @@ -63,6 +64,10 @@ def self.config_file 'settings.yaml' end + def self.search_description(_key, _operator, _value) + {} + end + # can't use our own settings def self.per_page 20