Exception: Mongoid::Errors::NoMetadata

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

Overview

Used when trying to persist data when metadata has not been set.

Constant Summary

Constants inherited from MongoidError

MongoidError::BASE_KEY

Instance Method Summary collapse

Methods inherited from MongoidError

#compose_message

Constructor Details

#initialize(klass) ⇒ NoMetadata

Create the new error.

Examples:

Create the error.

NoMetadata.new(Address)

Parameters:

  • klass (Class)

    The document class.

Since:

  • 3.0.0



16
17
18
# File 'lib/mongoid/errors/no_metadata.rb', line 16

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