discard
discard copied to clipboard
ππ Soft deletes for ActiveRecord done right
**NOTE:** This PR doesnβt currently include tests (I tested against the provided Ruby script). Should this code be something you all want in the project, I will by all means...
**Describe the bug** Currently the callbacks such as after_discard are run outside of the discarded model's transaction. This can lead to unexpected behavior where, for example, the model is discarded...
Do you think a after_discard_commit makes sense, which is triggered just as after_destroy_commit ? Reason is, that we have some queue triggers that should only be fired when the transactin...
I'm trying to understand an issue we have on Solidus: https://github.com/solidusio/solidus/pull/3202. These are two specs that describe the behavior we had with discard 1.0.0: ```ruby describe 'discarded? value on callbacks/validations'...
While working with the discard gem I noticed that you can't discard already discarded records. There wasn't any mention of this in the docs and the error message wasn't very...
Discard -> Undiscard !