diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2019-04-10 17:49:42 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2019-04-12 09:19:03 +0900 |
commit | 9252da96597fbffe2246704556524c4804239552 (patch) | |
tree | 29efc8db177ce019f4bcbac90f5d6667f54226d7 /activerecord/CHANGELOG.md | |
parent | faf07d1468af06bb3f7f5dd0776d77dd252af3b6 (diff) | |
download | rails-9252da96597fbffe2246704556524c4804239552.tar.gz rails-9252da96597fbffe2246704556524c4804239552.tar.bz2 rails-9252da96597fbffe2246704556524c4804239552.zip |
Don't call after_commit callbacks despite a record isn't saved
Regardless of a record isn't saved (e.g. validation is failed),
`after_commit` / `after_rollback` callbacks are invoked for now.
To fix the issue, this adds a record to the current transaction only
when a record is actually saved.
Fixes #29747.
Closes #29833.
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r-- | activerecord/CHANGELOG.md | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 1cf3f3352f..3b8767787f 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,9 @@ +* Don't call commit/rollback callbacks despite a record isn't saved. + + Fixes #29747. + + *Ryuta Kamizono* + * Fix circular `autosave: true` causes invalid records to be saved. Prior to the fix, when there was a circular series of `autosave: true` |