class Mongoid::Errors::InvalidStorageOptions

Raised when options provided to :store_in are invalid.

Public Class Methods

new(klass, options) click to toggle source

Create the new error.

@example Create the new error.

InvalidStorageOptions.new(Person, invalid_option: 'name')

@param [ Class ] klass The model class. @param [ Hash, String, Symbol ] options The provided options.

@since 3.0.0

Calls superclass method
# File lib/mongoid/errors/invalid_storage_options.rb, line 19
def initialize(klass, options)
  super(
    compose_message(
      "invalid_storage_options",
      { klass: klass, options: options }
    )
  )
end