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/test/cases/unsafe_raw_sql_test.rb | |
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/test/cases/unsafe_raw_sql_test.rb')
0 files changed, 0 insertions, 0 deletions