ar_transaction_changes
ar_transaction_changes copied to clipboard
Discuss about changing the same attribute multiple times
If we do something like this:
user = User.create!(name: 'a')
User.transaction do
user.update_attribute(:name, 'b')
user.update_attribute(:name, 'a')
end
should we store name
as changed attributes?
The behaviour should probably be consistent with active record's changed_attributes
, which seems to omit changes to attributes that were changed back. So it looks like this is a bug.
By the looks of the changes in the merged PR, this can be closed.