class Mongoid::Errors::InvalidStorageParent

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

Public Class Methods

new(klass) click to toggle source

Create the new error.

@example Create the new error.

InvalidStorageParent.new(Person)

@param [ Class ] klass The model class.

@since 4.0.0

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