Fully address AR callback issues

This commit is contained in:
CactusPuppy 2021-04-09 00:42:14 -07:00
parent 29804c8681
commit 3d9b6400b9
No known key found for this signature in database
GPG key ID: 4B33B0A3E15E2C82
2 changed files with 9 additions and 16 deletions

View file

@ -25,7 +25,7 @@ module TrackSavedChanges
# on save
def ts_track_saved_changes
# maintain an array of ActiveModel::Dirty.changes
@ts_saved_changes_history << changes.dup
@ts_saved_changes_history << previous_changes.dup
# accumulate the most recent changes
@ts_saved_changes_history.last.each_pair { |k, v| ts_track_saved_change k, v }
end