Exception: Mongoid::Errors::Validations
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
MongoidError ,
StandardError
|
|
Instance Chain:
self,
MongoidError ,
StandardError
|
|
Inherits: |
Mongoid::Errors::MongoidError
|
Defined in: | lib/mongoid/errors/validations.rb |
Overview
Raised when a persistence method ending in ! fails validation. The message will contain the full error messages from the ::Mongoid::Document
in question.
Constant Summary
MongoidError
- Inherited
Class Method Summary
- .new(document) ⇒ Validations constructor
Instance Attribute Summary
MongoidError
- Inherited
Instance Method Summary
MongoidError
- Inherited
#compose_message | Compose the message. |
#translate | Given the key of the specific error and the options hash, translate the message. |
#translate_problem | Create the problem. |
#translate_resolution | Create the resolution. |
#translate_summary | Create the summary. |
Constructor Details
.new(document) ⇒ Validations
Instance Attribute Details
#document (readonly) Also known as: #record
[ GitHub ]# File 'lib/mongoid/errors/validations.rb', line 13
attr_reader :document
#record (readonly)
Alias for #document.
# File 'lib/mongoid/errors/validations.rb', line 14
alias :record :document