Module: ActiveModel::Datastore::ExcludedIndexes::ClassMethods
- Defined in:
- lib/active_model/datastore/excluded_indexes.rb
Instance Method Summary collapse
- #clear_index_exclusions! ⇒ Object
-
#no_indexes(*attributes) ⇒ Object
Sets attributes to be excluded from the Datastore indexes.
Instance Method Details
#clear_index_exclusions! ⇒ Object
33 34 35 |
# File 'lib/active_model/datastore/excluded_indexes.rb', line 33 def clear_index_exclusions! define_method('no_index_attributes') { [] } end |
#no_indexes(*attributes) ⇒ Object
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.
28 29 30 31 |
# 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 |