RubyGems
npm
Organizations
Log in
Sign up
RubyGems
pg_json
Versions diffs
0.1.16 → 0.1.17
pg_json 0.1.16 → 0.1.17
Sign up to get
free
protection for your applications and to get access to all the features.
Files changed (2)
hide
show
data/lib/pg_json/sequel/pg_json.rb
+3
-0
metadata
+1
-1
data/lib/pg_json/sequel/pg_json.rb
CHANGED
Viewed
@@ -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
Viewed
@@ -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: