active_record_inherit_assoc 2.13.1 → 2.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/active_record_inherit_assoc.rb +5 -16
- metadata +6 -96
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16bf88b015995589afc4fd4bf6102a0c7ee857dff718e7c1b7dcb091867c68f1
|
4
|
+
data.tar.gz: '019b29db12b175296f8ac3504bedf8628fce1a4e608b1c5d435ab5acb99b3d89'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49cf9ad42190cb93fc234a2fa396ec1cbd6f4902f1e8b16bb8434f656c79f12b24fa51cf6e2f538e76293fa24c63475996b76bfb5cd4d369acd1874defcbef31
|
7
|
+
data.tar.gz: cca80e63d3a84e26d153d65ec8ad4f9bc1faff19c5f401920d478e831280b726c6ca47c306d00826434d03de9ca688f411909cb291038d6b64fa64d889767294
|
@@ -41,23 +41,12 @@ end
|
|
41
41
|
ActiveRecord::Associations::Association.send(:prepend, ActiveRecordInheritAssocPrepend)
|
42
42
|
|
43
43
|
module ActiveRecordInheritPreloadAssocPrepend
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
result.each do |owner, associated_records|
|
49
|
-
filter_associated_records_with_inherit!(owner, associated_records, inherit)
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
53
|
-
else
|
54
|
-
def associate_records_to_owner(owner, records)
|
55
|
-
if inherit = reflection.options[:inherit]
|
56
|
-
records = Array(records)
|
57
|
-
filter_associated_records_with_inherit!(owner, records, inherit)
|
58
|
-
end
|
59
|
-
super
|
44
|
+
def associate_records_to_owner(owner, records)
|
45
|
+
if inherit = reflection.options[:inherit]
|
46
|
+
records = Array(records)
|
47
|
+
filter_associated_records_with_inherit!(owner, records, inherit)
|
60
48
|
end
|
49
|
+
super
|
61
50
|
end
|
62
51
|
|
63
52
|
def build_scope
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_record_inherit_assoc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Osheroff
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-08-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -16,104 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
20
|
-
- - "<"
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '7.1'
|
19
|
+
version: '6.1'
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
24
|
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
30
|
-
- - "<"
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: '7.1'
|
33
|
-
- !ruby/object:Gem::Dependency
|
34
|
-
name: minitest
|
35
|
-
requirement: !ruby/object:Gem::Requirement
|
36
|
-
requirements:
|
37
|
-
- - ">="
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: '0'
|
40
|
-
type: :development
|
41
|
-
prerelease: false
|
42
|
-
version_requirements: !ruby/object:Gem::Requirement
|
43
|
-
requirements:
|
44
|
-
- - ">="
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: '0'
|
47
|
-
- !ruby/object:Gem::Dependency
|
48
|
-
name: minitest-rg
|
49
|
-
requirement: !ruby/object:Gem::Requirement
|
50
|
-
requirements:
|
51
|
-
- - ">="
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '0'
|
54
|
-
type: :development
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
requirements:
|
58
|
-
- - ">="
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
version: '0'
|
61
|
-
- !ruby/object:Gem::Dependency
|
62
|
-
name: rake
|
63
|
-
requirement: !ruby/object:Gem::Requirement
|
64
|
-
requirements:
|
65
|
-
- - ">="
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version: '0'
|
68
|
-
type: :development
|
69
|
-
prerelease: false
|
70
|
-
version_requirements: !ruby/object:Gem::Requirement
|
71
|
-
requirements:
|
72
|
-
- - ">="
|
73
|
-
- !ruby/object:Gem::Version
|
74
|
-
version: '0'
|
75
|
-
- !ruby/object:Gem::Dependency
|
76
|
-
name: bump
|
77
|
-
requirement: !ruby/object:Gem::Requirement
|
78
|
-
requirements:
|
79
|
-
- - ">="
|
80
|
-
- !ruby/object:Gem::Version
|
81
|
-
version: '0'
|
82
|
-
type: :development
|
83
|
-
prerelease: false
|
84
|
-
version_requirements: !ruby/object:Gem::Requirement
|
85
|
-
requirements:
|
86
|
-
- - ">="
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
version: '0'
|
89
|
-
- !ruby/object:Gem::Dependency
|
90
|
-
name: sqlite3
|
91
|
-
requirement: !ruby/object:Gem::Requirement
|
92
|
-
requirements:
|
93
|
-
- - ">="
|
94
|
-
- !ruby/object:Gem::Version
|
95
|
-
version: '0'
|
96
|
-
type: :development
|
97
|
-
prerelease: false
|
98
|
-
version_requirements: !ruby/object:Gem::Requirement
|
99
|
-
requirements:
|
100
|
-
- - ">="
|
101
|
-
- !ruby/object:Gem::Version
|
102
|
-
version: '0'
|
103
|
-
- !ruby/object:Gem::Dependency
|
104
|
-
name: byebug
|
105
|
-
requirement: !ruby/object:Gem::Requirement
|
106
|
-
requirements:
|
107
|
-
- - ">="
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
version: '0'
|
110
|
-
type: :development
|
111
|
-
prerelease: false
|
112
|
-
version_requirements: !ruby/object:Gem::Requirement
|
113
|
-
requirements:
|
114
|
-
- - ">="
|
115
|
-
- !ruby/object:Gem::Version
|
116
|
-
version: '0'
|
26
|
+
version: '6.1'
|
117
27
|
description:
|
118
28
|
email:
|
119
29
|
- ben@gimbo.net
|
@@ -134,14 +44,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
134
44
|
requirements:
|
135
45
|
- - ">="
|
136
46
|
- !ruby/object:Gem::Version
|
137
|
-
version: '
|
47
|
+
version: '3.1'
|
138
48
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
139
49
|
requirements:
|
140
50
|
- - ">="
|
141
51
|
- !ruby/object:Gem::Version
|
142
52
|
version: '0'
|
143
53
|
requirements: []
|
144
|
-
rubygems_version: 3.
|
54
|
+
rubygems_version: 3.5.11
|
145
55
|
signing_key:
|
146
56
|
specification_version: 4
|
147
57
|
summary: Attribute inheritance for AR associations
|