Exception: Mongoid::Errors::InvalidField
- Inherits:
-
MongoidError
- Object
- StandardError
- MongoidError
- Mongoid::Errors::InvalidField
- Defined in:
- lib/mongoid/errors/invalid_field.rb
Overview
This error is raised when trying to create a field 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, field, name) ⇒ InvalidField
constructor
private
Create the new error.
Methods inherited from MongoidError
Constructor Details
#initialize(klass, field, name) ⇒ InvalidField
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Create the new error.
21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/mongoid/errors/invalid_field.rb', line 21 def initialize(klass, field, name) super( ( "invalid_field", { name: name, field: field, origin: origin(klass, name), file: location(klass, name)[0], line: location(klass, name)[1] } ) ) end |