trabajo-afectivo/config/initializers/models_searchable.rb

11 lines
406 B
Ruby
Raw Normal View History

# 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')
if models_config && models_current != models_config
Setting.set('models_searchable', models_current)
end
end
end