Exception: Mongoid::Errors::InvalidStorageParent

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

Overview

Raised when calling store_in in a sub-class of Mongoid::Document

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) ⇒ InvalidStorageParent

Create the new error.

Examples:

Create the new error.

InvalidStorageParent.new(Person)

Parameters:

  • klass (Class)

    The model class.

Since:

  • 4.0.0



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

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