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 Method Summary collapse
-
#initialize(klass, name) ⇒ InvalidField
constructor
Create the new error.
Methods inherited from MongoidError
Constructor Details
#initialize(klass, name) ⇒ InvalidField
Create the new error.
16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/mongoid/errors/invalid_field.rb', line 16 def initialize(klass, name) super( ( "invalid_field", { name: name, origin: origin(klass, name), file: location(klass, name)[0], line: location(klass, name)[1] } ) ) end |