Exception: MongoMapper::DocumentNotValid

Inherits:
MongoMapperError show all
Defined in:
lib/mongo_mapper.rb,
lib/mongo_mapper/mongo_mapper.rb

Overview

raised when document not valid and using !

Instance Method Summary collapse

Constructor Details

#initialize(document) ⇒ DocumentNotValid

Returns a new instance of DocumentNotValid.



27
28
29
# File 'lib/mongo_mapper.rb', line 27

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