Sha256: 8611daafdd71ff5bd43cff0d741d748ddb7af28ecc120ba5a09c095c1a11ec71
Contents?: true
Size: 302 Bytes
Versions: 20
Compression:
Stored size: 302 Bytes
Contents
module IntercomRails class DateHelper def self.convert_dates_to_unix_timestamps(object) return Hash[object.map { |k, v| [k, convert_dates_to_unix_timestamps(v)] }] if object.is_a?(Hash) return object.to_i if object.is_a?(Time) || object.is_a?(DateTime) object end end end
Version data entries
20 entries across 20 versions & 1 rubygems