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

Add after_save_commit callback shortcut #35804

Merged
merged 2 commits into from
Apr 2, 2019
Merged

Add after_save_commit callback shortcut #35804

merged 2 commits into from
Apr 2, 2019

Conversation

dhh
Copy link
Member

@dhh dhh commented Mar 30, 2019

We have shortcuts for declaring after_commit callbacks for update and create, but not the very common combination of using them both together. This adds that.

@dhh dhh merged commit 59bed68 into master Apr 2, 2019
@dhh dhh deleted the add-after_save_commit branch April 2, 2019 23:36
@sharang-d
Copy link
Contributor

Do you think we should add the method to https://github.com/rails/rails/blob/7020c6f9721c36616e58cba344549183aa091233/guides/source/active_record_callbacks.md#transaction-callbacks where we talk about the three after_<something>_commit callbacks?

@dhh
Copy link
Member Author

dhh commented Apr 3, 2019 via email

@sharang-d
Copy link
Contributor

I'll work on a PR for it.

abhaynikam added a commit to abhaynikam/rails that referenced this pull request Apr 5, 2019
suketa added a commit to suketa/rails_sandbox that referenced this pull request Oct 5, 2019
Add `after_save_commit` callback shortcut
rails/rails#35804
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants