Exception: Mongoid::Errors::InvalidIncludes
- Inherits:
-
MongoidError
- Object
- StandardError
- MongoidError
- Mongoid::Errors::InvalidIncludes
- Defined in:
- lib/mongoid/errors/invalid_includes.rb
Overview
This error is raised when an invalid value is passed to an eager loading query.
Constant Summary
Constants inherited from MongoidError
Instance Method Summary collapse
-
#initialize(klass, args) ⇒ InvalidIncludes
constructor
Initialize the error.
Methods inherited from MongoidError
Constructor Details
#initialize(klass, args) ⇒ InvalidIncludes
Initialize the error.
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/mongoid/errors/invalid_includes.rb', line 18 def initialize(klass, args) super( ( "invalid_includes", { klass: klass.name, args: args.map(&:inspect).join(", "), relations: klass.relations.keys.map(&:inspect).join(", ") } ) ) end |