Skip to content

Commit

Permalink
Hash and Array values should always go to changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rous-gg committed Mar 27, 2024
1 parent a0055ab commit eb4308e
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,10 @@ def extract_changes(entity, hash)
hash.each do |column, value|
previous_column_value = persistence_state[column]

if persistence_state.has_key?(column) && previous_column_value != value
changes[column] = value
if persistence_state.has_key?(column)
if value.is_a?(Hash) || value.is_a?(Array) || previous_column_value != value
changes[column] = value
end
end
end

Expand Down

0 comments on commit eb4308e

Please sign in to comment.