Exception: Mongoid::Errors::InvalidStorageOptions

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

Overview

Raised when options provided to :store_in are invalid.

Constant Summary

Constants inherited from MongoidError

MongoidError::BASE_KEY

Instance Attribute Summary

Attributes inherited from MongoidError

#problem, #resolution, #summary

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



19
20
21
22
23
24
25
26
# File 'build/mongoid-7.3/lib/mongoid/errors/invalid_storage_options.rb', line 19

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