activerecord_nested_scope 1.0.2 → 1.0.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: a44db3d31ebd21c792a4c2c1780760983cc2f038
|
4
|
+
data.tar.gz: 3def58069b0d7bdeda2b9169a92ce4d8880e7795
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d65049d12b954f31efd9be805176b335960852bb2e52127a031c11b29847c72ef24985241a5c7ff6cb959b1c9908cd68d934a2e6f25b72666c59a36fc018891c
|
7
|
+
data.tar.gz: 011aaa35c227300d9c13748b51638eccc3c41830222bc1f4f357e16d9a4350fe59a238b5660c6641720565b17b411fb34b6b21387a9a17c1b85202aeac9b7b9c
|
@@ -52,7 +52,7 @@ module ActiveRecordNestedScope
|
|
52
52
|
end
|
53
53
|
|
54
54
|
def belongs_to_polymorphic_relation(klass, ref)
|
55
|
-
types = klass.unscoped.group(ref.foreign_type).pluck(ref.foreign_type)
|
55
|
+
types = klass.unscoped.group(ref.foreign_type).pluck(ref.foreign_type).compact
|
56
56
|
if types.present?
|
57
57
|
rels = types.map { |type|
|
58
58
|
if (parent = type.safe_constantize)
|