mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #15016 from arthurnn/dup_attr_on_save_state
Dup the changed_attributes otherwise we could lose them
This commit is contained in:
commit
bab48f0a3d
1 changed files with 1 additions and 1 deletions
|
@ -350,7 +350,7 @@ module ActiveRecord
|
|||
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.
|
||||
|
|
Loading…
Reference in a new issue