Created
March 28, 2013 20:54
-
-
Save davbre/5266699 to your computer and use it in GitHub Desktop.
DataMapper save errors, inspection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DataMapper::Model.raise_on_save_failure = true | |
begin | |
[your_object_name].save | |
rescue DataMapper::SaveFailureError => e | |
puts e.resource.errors.inspect | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks!