active_record-associated_object 0.9.2 → 0.9.3
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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/active_record/associated_object/version.rb +1 -1
- data/lib/active_record/associated_object.rb +5 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 212ac3b587d683336e8374ad9e36afee0158caf3cce1a930ca5d45f21845369d
|
4
|
+
data.tar.gz: 7cdc72150f9e05978372087244db5b87792805e6c20e915e98c25a7c89516946
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86b6ff3ade83cb8e2e9ad3a1280e236dc0b71bc0c3c7409dddc9510965587d59ed11e7e0bf18379e035bbc40d778208f0d37a034f838fb14097e8ec4c7a8b9cf
|
7
|
+
data.tar.gz: c8ce1b79f36ce885962503c688d69ed7ca5ed84f8eff7ab2e84683ae688e30ccc63815dd6f337acea08d28eca4670d013ae1264c65017a2f95e1f7aa12c7ffbd
|
data/Gemfile.lock
CHANGED
@@ -25,16 +25,16 @@ class ActiveRecord::AssociatedObject
|
|
25
25
|
record.class_eval(&block)
|
26
26
|
end
|
27
27
|
|
28
|
-
def method_missing(
|
29
|
-
if !record.respond_to?(
|
30
|
-
record.public_send(
|
28
|
+
def method_missing(meth, ...)
|
29
|
+
if !record.respond_to?(meth) || meth.end_with?("?", "=") then super else
|
30
|
+
record.public_send(meth, ...).then do |value|
|
31
31
|
value.respond_to?(:each) ? value.map(&attribute_name) : value&.public_send(attribute_name)
|
32
32
|
end
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
36
|
-
def respond_to_missing?(
|
37
|
-
(
|
36
|
+
def respond_to_missing?(meth, ...)
|
37
|
+
(record.respond_to?(meth, ...) && !meth.end_with?("?", "=")) || super
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|