Module: ActiveModel::Datastore::ExcludedIndexes

Extended by:
ActiveSupport::Concern
Included in:
ActiveModel::Datastore
Defined in:
lib/active_model/datastore/excluded_indexes.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#exclude_from_index(entity, boolean) ⇒ Object

Sets all entity properties to be included/excluded from the Datastore indexes.



12
13
14
15
16
# File 'lib/active_model/datastore/excluded_indexes.rb', line 12

def exclude_from_index(entity, boolean)
  entity.properties.to_h.each_key do |value|
    entity.exclude_from_indexes! value, boolean
  end
end

#no_index_attributesObject



5
6
7
# File 'lib/active_model/datastore/excluded_indexes.rb', line 5

def no_index_attributes
  []
end