2015-08-16 09:14:24 +00:00
|
|
|
# update settings for searchable models
|
|
|
|
if ActiveRecord::Base.connection.tables.include?('settings')
|
|
|
|
models_current = Models.searchable.map(&:to_s)
|
|
|
|
models_config = Setting.get('models_searchable')
|
2015-08-16 09:24:15 +00:00
|
|
|
if models_config && models_current != models_config
|
2015-08-16 09:14:24 +00:00
|
|
|
Setting.set('models_searchable', models_current)
|
|
|
|
end
|
|
|
|
end
|