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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9264143e5cc12563d395eb4922e2ca8151d632f3238428c67348182a483390c8
4
- data.tar.gz: 6033f0a1aefe4879149c4063a25ed4303dc3f27ab7f09997a94d684f0af37827
3
+ metadata.gz: 212ac3b587d683336e8374ad9e36afee0158caf3cce1a930ca5d45f21845369d
4
+ data.tar.gz: 7cdc72150f9e05978372087244db5b87792805e6c20e915e98c25a7c89516946
5
5
  SHA512:
6
- metadata.gz: d5e916c111d9d11a3b76189ae1213056026ab03a862cb4258bde73b967cef71ad7ed54a5699cf41935a45c25a7ea84dde11e587cb66ee1273db9fe1451dbbe78
7
- data.tar.gz: 96c40ae7e7242765da0ed679a5fc032a3ef6ad7e6e2c9a0aa639ad3b7088c545232cfb27fe8bad198b86a0509262edac884c922ec2a3f424b3cbff550689e309
6
+ metadata.gz: 86b6ff3ade83cb8e2e9ad3a1280e236dc0b71bc0c3c7409dddc9510965587d59ed11e7e0bf18379e035bbc40d778208f0d37a034f838fb14097e8ec4c7a8b9cf
7
+ data.tar.gz: c8ce1b79f36ce885962503c688d69ed7ca5ed84f8eff7ab2e84683ae688e30ccc63815dd6f337acea08d28eca4670d013ae1264c65017a2f95e1f7aa12c7ffbd
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active_record-associated_object (0.9.2)
4
+ active_record-associated_object (0.9.3)
5
5
  activerecord (>= 6.1)
6
6
 
7
7
  GEM
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ActiveRecord
4
4
  class AssociatedObject
5
- VERSION = "0.9.2"
5
+ VERSION = "0.9.3"
6
6
  end
7
7
  end
@@ -25,16 +25,16 @@ class ActiveRecord::AssociatedObject
25
25
  record.class_eval(&block)
26
26
  end
27
27
 
28
- def method_missing(method, ...)
29
- if !record.respond_to?(method) then super else
30
- record.public_send(method, ...).then do |value|
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?(name, ...)
37
- (name != :abstract_class? && record.respond_to?(name, ...)) || super
36
+ def respond_to_missing?(meth, ...)
37
+ (record.respond_to?(meth, ...) && !meth.end_with?("?", "=")) || super
38
38
  end
39
39
  end
40
40
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_record-associated_object
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kasper Timm Hansen