lib/ecoportal/api/common/hash_diff.rb in ecoportal-api-0.1.12 vs lib/ecoportal/api/common/hash_diff.rb in ecoportal-api-0.2.0

- old
+ new

@@ -11,10 +11,10 @@ {}.tap do |diffed| a.each do |key, a_value| b_value = b[key] next if a_value == b_value && !ID_KEYS.include?(key) diffed[key] = diff(a_value, b_value) - diffed.delete[key] if diffed[key] == {} + diffed.delete(key) if diffed[key] == {} end # All keys are IDs, so it's actually blank if (diffed.keys - ID_KEYS).empty? return {} end