Exception: MongoMapper::DocumentNotValid

Inherits:
Error
  • Object
show all
Defined in:
lib/mongo_mapper/exceptions.rb

Overview

raised when document not valid and using !

Instance Method Summary collapse

Constructor Details

#initialize(document) ⇒ DocumentNotValid

Returns a new instance of DocumentNotValid.



17
18
19
# File 'lib/mongo_mapper/exceptions.rb', line 17

def initialize(document)
  super("Validation failed: #{document.errors.full_messages.join(", ")}")
end