cartodb/config/initializers/hash.rb
2020-06-15 10:58:47 +08:00

7 lines
112 B
Ruby

class Hash
def convert_nulls
self.inject({}){|h,(k,v)| h[k] = (v == "null" ? nil : v); h }
end
end