models_searchable.rb 218 B

123456789
  1. # update settings for searchable models
  2. begin
  3. return if !Setting.exists?(name: 'models_searchable')
  4. Setting.set('models_searchable', Models.searchable.map(&:to_s))
  5. rescue ActiveRecord::StatementInvalid
  6. nil
  7. end