pg_serializable 2.1.1 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +17 -0
- data/lib/pg_serializable.rb +1 -1
- data/lib/pg_serializable/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10817b9de01f59f3048155e50dc69639818f302e715047785a7ac309fb5ffb72
|
4
|
+
data.tar.gz: 040e4184a1029f9b86f6af4fc8c0cc5aca6348326e0e1f5a1fd5a62d1c447fe1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 278d6800ea8c45679a157d0c28edfa53d7fa5e9ab28a28763522d57c06c2419f5d242a07bc8f6b4861a72c78d26c519ac2d92adc865c6e8498d7d13aaa72532c
|
7
|
+
data.tar.gz: d43a363ed01c719457bc4e49a963c2dbd96afd41306174c62e7287774500624b61fe70a4dd85610a4df903eda6120dc34c497cf5457553da7d6707d0789e5d65
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -7,6 +7,23 @@
|
|
7
7
|
|
8
8
|
Serialize json directly from postgres (9.4+).
|
9
9
|
|
10
|
+
## Upgrading from version 2.x.x to 3.x.x
|
11
|
+
|
12
|
+
Serialization returns a PORO instead of a json string. If you have code like:
|
13
|
+
```ruby
|
14
|
+
OJ.load(Product.where(id: ids).json)
|
15
|
+
```
|
16
|
+
|
17
|
+
You can replace it with:
|
18
|
+
```ruby
|
19
|
+
Product.where(id: ids).json
|
20
|
+
```
|
21
|
+
|
22
|
+
To automatically use OJ to serialize your POROs to json strings, add this code to your initialization:
|
23
|
+
```ruby
|
24
|
+
Oj.optimize_rails()
|
25
|
+
```
|
26
|
+
|
10
27
|
## Motivation
|
11
28
|
Models:
|
12
29
|
```ruby
|
data/lib/pg_serializable.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pg_serializable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- matthewjf
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -248,8 +248,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
248
248
|
- !ruby/object:Gem::Version
|
249
249
|
version: '0'
|
250
250
|
requirements: []
|
251
|
-
|
252
|
-
rubygems_version: 2.7.6
|
251
|
+
rubygems_version: 3.0.4
|
253
252
|
signing_key:
|
254
253
|
specification_version: 4
|
255
254
|
summary: serializes rails models from postgres (9.5+)
|