Exception: Mongoid::Errors::InvalidRelation
- Inherits:
-
MongoidError
- Object
- StandardError
- MongoidError
- Mongoid::Errors::InvalidRelation
- Defined in:
- lib/mongoid/errors/invalid_relation.rb
Overview
This error is raised when trying to create a relation that conflicts with an already defined method.
Constant Summary
Constants inherited from MongoidError
Instance Attribute Summary
Attributes inherited from MongoidError
#problem, #resolution, #summary
Instance Method Summary collapse
-
#initialize(klass, name) ⇒ InvalidRelation
constructor
Create the new error.
Methods inherited from MongoidError
Constructor Details
#initialize(klass, name) ⇒ InvalidRelation
Create the new error.
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/mongoid/errors/invalid_relation.rb', line 18 def initialize(klass, name) super( ( "invalid_relation", { name: name, origin: origin(klass, name), file: location(klass, name)[0], line: location(klass, name)[1] } ) ) end |