Permalink
Browse files

Merge branch 'patch-1' of https://github.com/untoldone/mongomapper in…

…to untoldone-patch-1
  • Loading branch information...
2 parents 1a4cb8d + 096d351 commit 4822f8620b656c0d461615a4ae543367169927f6 @jnunemaker jnunemaker committed Apr 16, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/mongo_mapper/exceptions.rb
@@ -14,7 +14,10 @@ class NotSupported < Error; end
# raised when document not valid and using !
class DocumentNotValid < Error
+ attr_reader :document
+
def initialize(document)
+ @document = document
super("Validation failed: #{document.errors.full_messages.join(", ")}")
end
end

0 comments on commit 4822f86

Please sign in to comment.