Exception: Humanoid::Errors::Validations
- Defined in:
- lib/humanoid/errors.rb
Overview
Raised when a persisence method ending in ! fails validation. The message will contain the full error messages from the Document
in question.
Example:
Validations.new(person.errors)
Instance Method Summary collapse
-
#initialize(errors) ⇒ Validations
constructor
A new instance of Validations.
- #message ⇒ Object
Constructor Details
#initialize(errors) ⇒ Validations
Returns a new instance of Validations.
51 52 53 |
# File 'lib/humanoid/errors.rb', line 51 def initialize(errors) @errors = errors end |
Instance Method Details
#message ⇒ Object
54 55 56 |
# File 'lib/humanoid/errors.rb', line 54 def "Validation failed: #{@errors.}" end |