- def self.convert_bd_in_hash(hash)
- hash.each do |k, v|
- if v.is_a?(BigDecimal)
- val = v.to_s('f')
- v = val # <---- i need THIS to somehow modify the original hash value
- elsif v.is_a?(Hash)
- convert_bd_in_hash v
- elsif v.is_a?(Array)
- v.flatten.each { |x| convert_bd_in_hash(x) if x.is_a?(Hash) }
- end
- end
- return hash
- end