2021-06-01 12:20:20 +00:00
|
|
|
# Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/
|
|
|
|
|
2015-08-16 09:14:24 +00:00
|
|
|
# update settings for searchable models
|
2019-07-04 11:16:55 +00:00
|
|
|
|
2021-07-21 12:00:13 +00:00
|
|
|
Rails.application.reloader.to_prepare do
|
|
|
|
begin
|
|
|
|
next if !Setting.exists?(name: 'models_searchable')
|
2019-07-04 11:16:55 +00:00
|
|
|
|
2021-07-21 12:00:13 +00:00
|
|
|
Setting.set('models_searchable', Models.searchable.map(&:to_s))
|
|
|
|
rescue ActiveRecord::StatementInvalid
|
|
|
|
nil
|
|
|
|
end
|
2015-12-03 22:16:04 +00:00
|
|
|
end
|