pg_json 0.1.16 → 0.1.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/pg_json/sequel/pg_json.rb +3 -0
  2. metadata +1 -1
@@ -8,6 +8,9 @@ end
8
8
  JSON_TYPES[:datetime] = lambda do |v|
9
9
  v.nil? ? nil : v.to_datetime
10
10
  end
11
+ JSON_TYPES[:timestamp] = lambda do |v|
12
+ v.nil? ? nil : Time.at(v.to_datetime)
13
+ end
11
14
 
12
15
  class Hash
13
16
  def json_typify!
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg_json
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.16
4
+ version: 0.1.17
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: