module ActiveModel::Datastore::ExcludedIndexes::ClassMethods

Public Instance Methods

clear_index_exclusions!() click to toggle source
# File lib/active_model/datastore/excluded_indexes.rb, line 33
def clear_index_exclusions!
  define_method('no_index_attributes') { [] }
end
no_indexes(*attributes) click to toggle source

Sets attributes to be excluded from the Datastore indexes.

Overrides no_index_attributes to return an Array of the attributes configured to be indexed.

For example, an indexed string property can not exceed 1500 bytes. String properties that are not indexed can be up to 1,048,487 bytes. All properties indexed by default.

# File lib/active_model/datastore/excluded_indexes.rb, line 28
def no_indexes(*attributes)
  attributes = attributes.collect(&:to_s)
  define_method('no_index_attributes') { attributes }
end