spyke
spyke copied to clipboard
bang methods
Hi there,
I'm curious if you'd be open to a PR (or possibly a few PRs) to add a suite of bang methods like #save!
, .create!
. These methods would provide the same base behavior as their non-bang versions but in the event of a local or remote validation error, they would raise a special exception, e.g. ResourceNotValid
. These bang methods are intended to be the equivalent of the ActiveRecord bang methods.
At Betterment we use the Her
gem quite a bit and have actually privately forked it and extended it with a lot of functionality, specifically including these bang methods. I'd like to try to migrate off of Her
and onto Spyke
. This change would go a long way to making Spyke
work for our use-cases.
Thanks for creating this library and thanks for your time!
@samandmoore adding those sounds reasonable to me! Thanks for checking out the gem :)