Exception: Mongoid::Errors::NoMetadata

Inherits:
MongoidError
  • Object
show all
Defined in:
build/mongoid-7.3/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 Attribute Summary

Attributes inherited from MongoidError

#problem, #resolution, #summary

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



18
19
20
# File 'build/mongoid-7.3/lib/mongoid/errors/no_metadata.rb', line 18

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