Module: Mongoid::Indexable::Validators::Options
Overview
Validates the options passed to the index macro.
Constant Summary collapse
- VALID_OPTIONS =
[ :background, :database, :default_language, :language_override, :name, :sparse, :unique, :max, :min, :bits, :bucket_size, :expire_after_seconds, :weights, :storage_engine, :key, :sphere_version, :text_version, :version, :partial_filter_expression, :collation, :wildcard_projection, ]
- VALID_TYPES =
[ 1, -1, "2d", "2dsphere", "geoHaystack", "text", "hashed" ]
Instance Method Summary collapse
-
#validate(klass, spec, options) ⇒ Object
Validate the index specification.
Instance Method Details
#validate(klass, spec, options) ⇒ Object
Validate the index specification.
56 57 58 59 |
# File 'lib/mongoid/indexable/validators/options.rb', line 56 def validate(klass, spec, ) validate_spec(klass, spec, ) (klass, spec, ) end |