lib/chartkick/helper.rb in chartkick-2.2.5 vs lib/chartkick/helper.rb in chartkick-2.3.0
- old
+ new
@@ -85,10 +85,10 @@
# https://github.com/rails/rails/blob/master/activesupport/lib/active_support/core_ext/hash/deep_merge.rb
def chartkick_deep_merge(hash_a, hash_b)
hash_a = hash_a.dup
hash_b.each_pair do |k, v|
tv = hash_a[k]
- hash_a[k] = tv.is_a?(Hash) && v.is_a?(Hash) ? tv.deep_merge(v) : v
+ hash_a[k] = tv.is_a?(Hash) && v.is_a?(Hash) ? chartkick_deep_merge(tv, v) : v
end
hash_a
end
end
end