aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorbrainopia <brainopia@evilmartians.com>2015-03-04 15:24:03 +0300
committerbrainopia <brainopia@evilmartians.com>2015-03-04 15:24:03 +0300
commitcaae79a385ce112245262a17414bcd96bea013c2 (patch)
tree3797e0efee56b7e360eca163effdd31183252b73 /activerecord/lib/active_record
parent8313797810eefb7e00d0b5a8e91ac02907fa5e8f (diff)
downloadrails-caae79a385ce112245262a17414bcd96bea013c2.tar.gz
rails-caae79a385ce112245262a17414bcd96bea013c2.tar.bz2
rails-caae79a385ce112245262a17414bcd96bea013c2.zip
Fix transaction state for unsynced records when entering transaction
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/transactions.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/transactions.rb b/activerecord/lib/active_record/transactions.rb
index ce4b2dfa8e..514dd1f2f3 100644
--- a/activerecord/lib/active_record/transactions.rb
+++ b/activerecord/lib/active_record/transactions.rb
@@ -356,6 +356,7 @@ module ActiveRecord
if has_transactional_callbacks?
self.class.connection.add_transaction_record(self)
else
+ sync_with_transaction_state
set_transaction_state(self.class.connection.transaction_state)
end
remember_transaction_record_state