Permalink
Browse files

Dup the changed_attributes otherwise we could lose them

  • Loading branch information...
1 parent 1e86e60 commit 3d057a0558fa72c23054124d8dab7244d8e6523d @arthurnn arthurnn committed with chancancode May 7, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/transactions.rb
View
2 activerecord/lib/active_record/transactions.rb
@@ -351,7 +351,7 @@ def remember_transaction_record_state #:nodoc:
end
@_start_transaction_state[:level] = (@_start_transaction_state[:level] || 0) + 1
@_start_transaction_state[:frozen?] = @attributes.frozen?
- @_start_transaction_state[:changed_attributes] ||= changed_attributes
+ @_start_transaction_state[:changed_attributes] ||= changed_attributes.dup
end
# Clear the new record state and id of a record.

0 comments on commit 3d057a0

Please sign in to comment.