Exception: MongoMapper::DocumentNotValid
Overview
raised when document not valid and using !
Instance Attribute Summary (collapse)
-
- (Object) document
readonly
Returns the value of attribute document.
Instance Method Summary (collapse)
-
- (DocumentNotValid) initialize(document)
constructor
A new instance of DocumentNotValid.
Constructor Details
- (DocumentNotValid) initialize(document)
A new instance of DocumentNotValid
19 20 21 22 |
# File 'lib/mongo_mapper/exceptions.rb', line 19 def initialize(document) @document = document super("Validation failed: #{document.errors..join(", ")}") end |
Instance Attribute Details
- (Object) document (readonly)
Returns the value of attribute document
17 18 19 |
# File 'lib/mongo_mapper/exceptions.rb', line 17 def document @document end |