class Mongoid::Errors::InvalidIndex
Raised when an invalid index is defined.
Public Class Methods
new(klass, spec, options)
click to toggle source
Create the new error.
@example Create the error.
InvalidIndex.new(Band, name: 1)
@param [ Class ] klass The model class. @param [ Hash ] spec The invalid specification. @param [ Hash ] options The invalid options.
@since 3.0.0
Calls superclass method
# File lib/mongoid/errors/invalid_index.rb, line 20 def initialize(klass, spec, options) super( compose_message( "invalid_index", { klass: klass.name, spec: spec, options: options } ) ) end