Skip to content
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

after_commit on destroy hook called on recover. #185

Open
thijsnado opened this issue Dec 1, 2020 · 0 comments
Open

after_commit on destroy hook called on recover. #185

thijsnado opened this issue Dec 1, 2020 · 0 comments

Comments

@thijsnado
Copy link

Using:

after_commit on: :destroy do
  # code
end

Seems to trigger not only on destroy, but also when calling recover on a freshly destroyed record. This seems to only be an issue if you call destroy and then recover on the same instance without re-finding in db. I suspect that the after_commit on: :destroy probably fires on any other save calls that happen after initial destroy code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant