Exception: Mongoid::Errors::InvalidPath

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

Overview

Used when attempting to get embedded paths with incorrect root path 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) ⇒ InvalidPath

Create the new error.

Examples:

Create the error.

InvalidPath.new(Address)

Parameters:

  • klass (Class)

    The document class.



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

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