activerecord-bixformer 0.4.11 → 0.4.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5a3541585aa33622c218ca37f1f491abdad35b18
|
|
4
|
+
data.tar.gz: 72cf94a236a2159812d76ded6bb1e9dc26db63af
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 32ca63f4725f5f5ddb266c4421461d6f9b31d438cae03c4426bca8f62fd418ef7e57bd9331cc57cd787ab09c3b65eccefad58f5d6b6800e5c0a7de66aa057d49
|
|
7
|
+
data.tar.gz: ab63c757e9d0bb65341684192302853b976dd9158c5899b686666c1f264e59bbea59a3a46b0f7af62c1438e765385ab6bf2742ee212078302043c44007ff6ae3
|
|
@@ -84,7 +84,9 @@ module ActiveRecord
|
|
|
84
84
|
end
|
|
85
85
|
|
|
86
86
|
def should_be_included
|
|
87
|
-
@model.activerecord_constant.reflections.find
|
|
87
|
+
@model.activerecord_constant.reflections.find do |k, r|
|
|
88
|
+
r.foreign_key == @name && r.class_name.constantize.respond_to?(:table_name)
|
|
89
|
+
end&.first
|
|
88
90
|
end
|
|
89
91
|
|
|
90
92
|
private
|
|
@@ -105,9 +105,9 @@ module ActiveRecord
|
|
|
105
105
|
assoc_should_be_included = assoc.should_be_included
|
|
106
106
|
|
|
107
107
|
if assoc_should_be_included.empty?
|
|
108
|
-
arr.push assoc.name
|
|
108
|
+
arr.push assoc.name
|
|
109
109
|
else
|
|
110
|
-
hash[assoc.name
|
|
110
|
+
hash[assoc.name] = assoc_should_be_included
|
|
111
111
|
end
|
|
112
112
|
end
|
|
113
113
|
|