Don't call after_commit when creating through an association and save fails, fixes #5802 #9115

Merged
merged 1 commit into from Feb 13, 2013

2 participants

@bensie

As described in #5802, when creating through an association using a non-bang create, if the create fails for some reason, after_commit is still called.

@steveklabnik
Ruby on Rails member

This looks fine to me, but we do need a CHANGELOG entry please. Just roll that into the first commit.

@steveklabnik steveklabnik merged commit f36b80b into rails:master Feb 13, 2013
@steveklabnik
Ruby on Rails member

Thank you! Sorry again it took me a while to review ❤️

@bensie

No problem at all! You're awesome.

@bensie bensie deleted the unknown repository branch Feb 13, 2013
@pjambet pjambet referenced this pull request in harrystech/rails-pipeline Sep 25, 2014
Merged

Only call after_commit on create for persisted records #5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment