2015-08-16 09:14:24 +00:00
|
|
|
# update settings for searchable models
|
|
|
|
if ActiveRecord::Base.connection.tables.include?('settings')
|
2015-09-25 14:37:55 +00:00
|
|
|
if Setting.columns_hash.key?('state_current') # TODO: remove me later
|
|
|
|
models_current = Models.searchable.map(&:to_s)
|
|
|
|
models_config = Setting.get('models_searchable')
|
2015-09-25 23:01:35 +00:00
|
|
|
if models_current != models_config
|
2015-09-25 14:37:55 +00:00
|
|
|
Setting.set('models_searchable', models_current)
|
|
|
|
end
|
2015-08-16 09:14:24 +00:00
|
|
|
end
|
|
|
|
end
|