-
Notifications
You must be signed in to change notification settings - Fork 529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Trigger an after_commit callback when restoring a record #559
feat: Trigger an after_commit callback when restoring a record #559
Conversation
@radar @mathieujobin Hi, I just wanted to see, is something wrong with this PR? |
@yoheimuta thanks for the reminder. I will review. For now, can you update or rebase and fix the merge conflict please? |
@mathieujobin Thank you for the reply. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a great feature with no downside.
All tests passed except for rails edge (8.0) and it's unlikely related
So I have no objections merging this
I will wait a bit for others to chime in and release later this month
Looks good to me as well. Happy for you to handle the release when you're ready @mathieujobin. |
Thank you! |
Fixes #457
This PR adds a new option called
after_restore_commit
so that Paranoia triggers a callback after committing to restore a record. The default value isfalse
, so this change won't affect existing users.Currently, there is no way to trigger a callback after commit. The suggested workaround doesn't work since the
restore
method doesn't triggerafter_commit, on: :update
either.📝 This branch is checked out from #558 to pass the CI tests.