Skip to content

Add after_save_commit callback shortcut#35804

Merged
dhh merged 2 commits intomasterfrom
add-after_save_commit
Apr 2, 2019
Merged

Add after_save_commit callback shortcut#35804
dhh merged 2 commits intomasterfrom
add-after_save_commit

Conversation

@dhh
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member Author

dhh commented Apr 3, 2019 via email

@sharang-d
Copy link
Copy Markdown
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