Exception: Mongoid::Errors::EagerLoad

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

Overview

This error is raised when attempting to eager load a many to many relation.

Constant Summary

Constants inherited from MongoidError

MongoidError::BASE_KEY

Instance Method Summary collapse

Methods inherited from MongoidError

#compose_message

Constructor Details

#initialize(name) ⇒ EagerLoad

Create the new eager load error.

Examples:

Create the new eager load error.

EagerLoad.new(:preferences)

Parameters:

  • name (Symbol)

    The name of the relation.

Since:

  • 2.2.0


17
18
19
# File 'lib/mongoid/errors/eager_load.rb', line 17

def initialize(name)
  super(compose_message("eager_load", { name: name }))
end