diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2018-06-05 00:27:43 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2018-06-07 06:58:45 +0900 |
commit | 5dc72378b783e924c5bf079ca660388ec4ac9224 (patch) | |
tree | 5411c32f4330fca8ea97c56b810ea77cd079983a /activerecord/test/cases/modules_test.rb | |
parent | 48c95cf7e591ed3b683705ded92c6d7c7518aaec (diff) | |
download | rails-5dc72378b783e924c5bf079ca660388ec4ac9224.tar.gz rails-5dc72378b783e924c5bf079ca660388ec4ac9224.tar.bz2 rails-5dc72378b783e924c5bf079ca660388ec4ac9224.zip |
Fix `collection.create` to could be rolled back by `after_save`
In `_create_record`, explicit `transaction` block requires rollback
handling manually when `insert_record` is failed.
We need to handle it in `_create_record`, not in `insert_record`, since
our test cases expect a record added to target and returned even if
`insert_record` is failed,
Closes #31488.
Diffstat (limited to 'activerecord/test/cases/modules_test.rb')
0 files changed, 0 insertions, 0 deletions