Exception: Mongoid::Errors::InvalidStorageOptions

Inherits:
MongoidError
  • Object
show all
Defined in:
lib/mongoid/errors/invalid_storage_options.rb

Overview

Raised when options provided to :store_in are invalid.

Constant Summary

Constant Summary

Constants inherited from MongoidError

MongoidError::BASE_KEY

Instance Method Summary collapse

Methods inherited from MongoidError

#compose_message

Constructor Details

#initialize(klass, options) ⇒ InvalidStorageOptions

Create the new error.

Examples:

Create the new error.

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

Parameters:

  • klass (Class)

    The model class.

  • options (Hash, String, Symbol)

    The provided options.

Since:

  • 3.0.0



17
18
19
20
21
22
23
24
# File 'lib/mongoid/errors/invalid_storage_options.rb', line 17

def initialize(klass, options)
  super(
    compose_message(
      "invalid_storage_options",
      { klass: klass, options: options }
    )
  )
end