active_delegate 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/active_delegate/attribute/object.rb +4 -0
- data/lib/active_delegate/attributes.rb +1 -1
- data/lib/active_delegate/version.rb +1 -1
- metadata +6 -7
- data/Gemfile.lock +0 -41
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6398259b9e21aac2c16ccb51633e725df80dd64d21bfb48f6187b7e75bb046ad
|
4
|
+
data.tar.gz: 2461654da4f2f96b077b85f585ab355c12703c254bf57f699c5a9c84357cdc1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63568b493c3f356676580719a155b00bd4f30cc66f71b833471b45bedc6a4102a99c6082e83eed040795ea48b1c8800f7fbf85ea20a5f73acc148d2e91d5331c
|
7
|
+
data.tar.gz: 310d14a2d501bce7865f8eb6d52d43ad7375e3e54fdbd461e316d9e803e8dc0d1dd52bf3a60d8758089eae4650dbf0f7f5b35765e789369bd22378d48f59f2c1
|
@@ -91,6 +91,10 @@ module ActiveDelegate
|
|
91
91
|
localized.any?
|
92
92
|
end
|
93
93
|
|
94
|
+
def accessible_attributes
|
95
|
+
@accessible_attributes ||= [unprefixed].map { |a| add_prefix(a) }
|
96
|
+
end
|
97
|
+
|
94
98
|
def delegatable_attributes
|
95
99
|
@delegatable_attributes ||= [unprefixed, *localized].map { |a| add_prefix(a) }
|
96
100
|
end
|
@@ -130,7 +130,7 @@ module ActiveDelegate
|
|
130
130
|
def define_attribute_methods(attribute)
|
131
131
|
model.attribute(attribute.aliased, attribute.read_type) if attribute.define?
|
132
132
|
|
133
|
-
attribute.
|
133
|
+
attribute.accessible_attributes.each do |method_name|
|
134
134
|
redefine_attribute_accessors(method_name, attribute)
|
135
135
|
end
|
136
136
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_delegate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonian Guveli
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-09-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '2.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '2.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: minitest
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -75,7 +75,6 @@ extensions: []
|
|
75
75
|
extra_rdoc_files: []
|
76
76
|
files:
|
77
77
|
- Gemfile
|
78
|
-
- Gemfile.lock
|
79
78
|
- LICENSE.txt
|
80
79
|
- README.md
|
81
80
|
- Rakefile
|
@@ -108,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
107
|
- !ruby/object:Gem::Version
|
109
108
|
version: '0'
|
110
109
|
requirements: []
|
111
|
-
rubygems_version: 3.0.
|
110
|
+
rubygems_version: 3.0.3
|
112
111
|
signing_key:
|
113
112
|
specification_version: 4
|
114
113
|
summary: Delegate ActiveRecord model attributes and associations
|
data/Gemfile.lock
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
active_delegate (1.0.1)
|
5
|
-
activerecord (~> 5.0)
|
6
|
-
|
7
|
-
GEM
|
8
|
-
remote: https://rubygems.org/
|
9
|
-
specs:
|
10
|
-
activemodel (5.2.1)
|
11
|
-
activesupport (= 5.2.1)
|
12
|
-
activerecord (5.2.1)
|
13
|
-
activemodel (= 5.2.1)
|
14
|
-
activesupport (= 5.2.1)
|
15
|
-
arel (>= 9.0)
|
16
|
-
activesupport (5.2.1)
|
17
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
18
|
-
i18n (>= 0.7, < 2)
|
19
|
-
minitest (~> 5.1)
|
20
|
-
tzinfo (~> 1.1)
|
21
|
-
arel (9.0.0)
|
22
|
-
concurrent-ruby (1.0.5)
|
23
|
-
i18n (1.1.0)
|
24
|
-
concurrent-ruby (~> 1.0)
|
25
|
-
minitest (5.10.3)
|
26
|
-
rake (10.5.0)
|
27
|
-
thread_safe (0.3.6)
|
28
|
-
tzinfo (1.2.5)
|
29
|
-
thread_safe (~> 0.1)
|
30
|
-
|
31
|
-
PLATFORMS
|
32
|
-
ruby
|
33
|
-
|
34
|
-
DEPENDENCIES
|
35
|
-
active_delegate!
|
36
|
-
bundler (~> 1.14)
|
37
|
-
minitest (~> 5.0)
|
38
|
-
rake (~> 10.0)
|
39
|
-
|
40
|
-
BUNDLED WITH
|
41
|
-
1.16.6
|