Modification methods that raise on failure for datamapper.
Ruby Shell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



dm-annoing-modificators is a little addition to datamappers Resource methods like #save, #update etc.

It duplicates raise_on_save_failure = true functionality. But it is more flexible in case you cannot enable raise_on_save_failure when third party software/libraries do not handle the exceptions gracefully.

All “command” methods have a ${name}_or_raise counterpart.

I normally only use these methods with specs or fixtures. Not in application domain logic.

A word of warning: This gem only works correctly when used with dm-validations form emmanuel/dm-validations feature/reorganize!

Contributing to dm-annoing-modificators

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet

  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it

  • Fork the project

  • Start a feature/bugfix branch

  • Commit and push until you are happy with your contribution

  • Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.

  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.


Copyright © 2011 Markus Schirp. See LICENSE.txt for further details.