diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2018-01-25 12:43:59 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-25 12:43:59 +0900 |
commit | c7dfe33f3958295a857d7bfb1070302e5b7429ff (patch) | |
tree | 893eb97d975eaf335efcccecd19cac2c48278365 /activerecord/lib | |
parent | f1a30d8ad5ae17e6202fd3a126027378773dcaea (diff) | |
parent | 226116a44010f4da857f6b26d73bec2618dea890 (diff) | |
download | rails-c7dfe33f3958295a857d7bfb1070302e5b7429ff.tar.gz rails-c7dfe33f3958295a857d7bfb1070302e5b7429ff.tar.bz2 rails-c7dfe33f3958295a857d7bfb1070302e5b7429ff.zip |
Merge pull request #31751 from yoreek/clear_transaction_state_when_ar_object_is_duped
Clear the transaction state when AR object is duped
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/core.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/core.rb b/activerecord/lib/active_record/core.rb index 2c65f618dc..e1a0b2ecf8 100644 --- a/activerecord/lib/active_record/core.rb +++ b/activerecord/lib/active_record/core.rb @@ -382,8 +382,10 @@ module ActiveRecord _run_initialize_callbacks - @new_record = true - @destroyed = false + @new_record = true + @destroyed = false + @_start_transaction_state = {} + @transaction_state = nil super end |