jsonapi_compliable 0.11.2 → 0.11.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f09a3b7abaad7968009175f50671ba51a32e42c0
|
4
|
+
data.tar.gz: d0a5de6083ae24be24380ff620fb10aa8ce0e3d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0aa3c2b725818ef5ef30e328a98dc1595ffdace212cf7addf5c15db2b19e4f5ee48f17cde4b26358ee0a4ab42a94e29d5bda032c4e58ffbad367610135298268
|
7
|
+
data.tar.gz: 9f0469e4fb7ff9b697729e02a5d616a6551beb3d55374fa6eeb6ba645a7a22e431f9651cb708f63adae0c3a8d2f6a8fb20b80bda83549ca780c761a7e9de78b4
|
@@ -76,7 +76,11 @@ module JsonapiCompliable
|
|
76
76
|
parent_ids = parents.map { |p| p.send(primary_key) }
|
77
77
|
parent_ids.uniq!
|
78
78
|
parent_ids.compact!
|
79
|
-
_scope.call
|
79
|
+
_scope.call
|
80
|
+
.joins(through)
|
81
|
+
.preload(through) # otherwise n+1 as we reference in #assign
|
82
|
+
.where(through => { fk => parent_ids })
|
83
|
+
.distinct
|
80
84
|
end
|
81
85
|
|
82
86
|
assign do |parents, children|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jsonapi_compliable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lee Richmond
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-04-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: jsonapi-serializable
|