Skip to content
Browse files

Dup the changed_attributes otherwise we could lose them

  • Loading branch information...
1 parent 5ff7c59 commit b0fa7cf3ff8432cc2eef3682b34763b7f8c93cc8 @arthurnn arthurnn committed 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
@@ -350,7 +350,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 b0fa7cf

Please sign in to comment.
Something went wrong with that request. Please try again.