jsonapi_compliable 0.11.19 → 0.11.20
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: 30a09fe20f0f51315ddb1b52f0c050ddb5cc4a11
|
4
|
+
data.tar.gz: 5b5a8516804383590b1500ac1ba877bb634d6152
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5434f22ea4634aec057f2f20ae551395999bc5b6700487feea5e97a159c30bd329c2d5e88f8421cb6432eddc7705986016d098fb0db4d08ef9f129e77a05d11
|
7
|
+
data.tar.gz: 96c35a20caa936b37a8d5b731aa0dd2ae50cc23e65a5af3ae033b7f36d13b26f8ffd2cc87fc3e2e95c53bd2803bc4296348d2dfaa99733bc2cc9bec9f6512c9a
|
@@ -94,10 +94,14 @@ module JsonapiCompliable
|
|
94
94
|
parent_ids = parents.map { |p| p.send(primary_key) }
|
95
95
|
parent_ids.uniq!
|
96
96
|
parent_ids.compact!
|
97
|
+
|
98
|
+
table_name = parents[0]
|
99
|
+
.class.reflections[through.to_s].klass.table_name
|
100
|
+
|
97
101
|
_scope.call
|
98
102
|
.joins(through)
|
99
103
|
.preload(through) # otherwise n+1 as we reference in #assign
|
100
|
-
.where(
|
104
|
+
.where(table_name => { fk => parent_ids })
|
101
105
|
.distinct
|
102
106
|
end
|
103
107
|
|
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.20
|
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-06-
|
12
|
+
date: 2018-06-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: jsonapi-serializable
|