Methods

Class/Module Index [+]

Quicksearch

Mongoid::Indexes::Validators::Options

Validates the options passed to the index macro.

Public Instance Methods

validate(klass, spec, options) click to toggle source

Validate the index specification.

@example Validate the index spec.

Options.validate(Band, name: 1)

@param [ Class ] klass The model class. @param [ Hash ] spec The index specification. @param [ Hash ] options The index options.

@raise [ Errors::InvalidIndex ] If validation failed.

@since 3.0.0

# File lib/mongoid/indexes/validators/options.rb, line 46
def validate(klass, spec, options)
  validate_spec(klass, spec, options)
  validate_options(klass, spec, options)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.