activerecord-delegation-expected_behaviour 1.8.0 → 1.9.0
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/lib/activerecord-delegation-expected_behaviour.rb +2 -2
- metadata +5 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 16f28b8cf43db6b56c36ad58b9829336067f22386a33533a17dd3562b58e87ba
|
|
4
|
+
data.tar.gz: 120fd1ae4e90777304f89e6cfcc044488f5e0a2e1a20f2df7ed53ca539f76102
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8d5bded085125c7b5af9c4f5680197450274ebc9873620a9873fd16863d4bb7cb738ef8e7b3287de6cd320976f64376c5a76a29753cbeea48678c1866c434d12
|
|
7
|
+
data.tar.gz: 8cd93709f38bc37d922544411c5b02a473944cb61ad220f49699ace5512112e7af38625a07b6d782c3efb7799ef253aa339652b5c1cc800a95c5405b3c521904
|
|
@@ -16,8 +16,8 @@ ActiveRecord::Delegation.module_eval do
|
|
|
16
16
|
protected
|
|
17
17
|
|
|
18
18
|
def delegate_to_klass_or_records(method, *args, **kwargs, &block)
|
|
19
|
-
if
|
|
20
|
-
scoping {
|
|
19
|
+
if model.respond_to?(method)
|
|
20
|
+
scoping { model.public_send(method, *args, **kwargs, &block) }
|
|
21
21
|
else
|
|
22
22
|
records.public_send(method, *args, **kwargs, &block)
|
|
23
23
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: activerecord-delegation-expected_behaviour
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.9.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Matthias Grosser
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 2026-02-05 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: activerecord
|
|
@@ -16,14 +15,14 @@ dependencies:
|
|
|
16
15
|
requirements:
|
|
17
16
|
- - "~>"
|
|
18
17
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '
|
|
18
|
+
version: '8.1'
|
|
20
19
|
type: :runtime
|
|
21
20
|
prerelease: false
|
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
22
|
requirements:
|
|
24
23
|
- - "~>"
|
|
25
24
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: '
|
|
25
|
+
version: '8.1'
|
|
27
26
|
description: Since Rails 5 you can no longer call some ActiveRecord class methods
|
|
28
27
|
named like their Enumerable counterparts. This gem reinstates the expected behaviour,
|
|
29
28
|
where you can always get the method from Enumerable by calling to_a on the relation.
|
|
@@ -40,7 +39,6 @@ homepage: https://github.com/mtgrosser/activerecord-delegation-expected_behaviou
|
|
|
40
39
|
licenses:
|
|
41
40
|
- MIT
|
|
42
41
|
metadata: {}
|
|
43
|
-
post_install_message:
|
|
44
42
|
rdoc_options: []
|
|
45
43
|
require_paths:
|
|
46
44
|
- lib
|
|
@@ -55,8 +53,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
55
53
|
- !ruby/object:Gem::Version
|
|
56
54
|
version: '0'
|
|
57
55
|
requirements: []
|
|
58
|
-
rubygems_version:
|
|
59
|
-
signing_key:
|
|
56
|
+
rubygems_version: 4.0.3
|
|
60
57
|
specification_version: 4
|
|
61
58
|
summary: Prefer some class methods over methods from Enumerable on relations
|
|
62
59
|
test_files: []
|