object_attorney 2.5.7 → 2.5.9
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 +8 -8
- data/lib/object_attorney/translation.rb +1 -1
- data/lib/object_attorney/validations.rb +1 -1
- data/lib/object_attorney/version.rb +1 -1
- data/lib/object_attorney.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
MDljMzMxODgxODg3MjU0NGFlMjlkZmQyN2Y4M2ZmODBkMGNlMDZlYw==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
Y2QzZTVlNzQ2OGJlYWFlYjM1ZDcxYTYyZTZkM2ZlYzJmMzJmNmJlYw==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
ZThjMDNjMDVhMzIyYzI0ZDg0NjJmNzQ2N2NiZDVkNGI4ODE5NjgwYmY4ZDdh
|
|
10
|
+
MzNiYWM1MzUwYWI4YWI3MGRiMjdhNjRmNzlkZDQ4NmU5ZWZjOTY1Yjg2Y2Q1
|
|
11
|
+
MTQyMzEyYmQyZmI1M2FlYjFkZWNhNmNlOGY3ZTUxOTc1MWNmZmQ=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
MjA5Nzg0MmNmNjVhMzRkZWQ0OTdjMWFjZTc0NmEwN2U0ZmEzZTg3NTc5Nzgw
|
|
14
|
+
Zjg3ZWViMWEzMjhiMDZkNTcxNWYzMTBmY2JjNjY1ZjRlZDkxYmM0ZjBlNmVj
|
|
15
|
+
Mjk2Y2Q4ZWNiYWE5NjBhY2I3YmJhZjliNDYyMWJkMzVhMGI4OTA=
|
|
@@ -5,7 +5,7 @@ module ObjectAttorney
|
|
|
5
5
|
def human_attribute_name(attribute_key_name, options = {})
|
|
6
6
|
no_translation = "-- no translation --"
|
|
7
7
|
|
|
8
|
-
defaults = ["object_attorney.attributes.#{
|
|
8
|
+
defaults = ["object_attorney.attributes.#{represented_object_class.to_s.underscore}.#{attribute_key_name}".to_sym]
|
|
9
9
|
defaults << options[:default] if options[:default]
|
|
10
10
|
defaults.flatten!
|
|
11
11
|
defaults << no_translation
|
|
@@ -24,7 +24,7 @@ module ObjectAttorney
|
|
|
24
24
|
if respond_to?(:represented_object)
|
|
25
25
|
represented_object.errors.each { |key, value| @imposed_errors[key] = value } if Helpers.has_errors_method?(represented_object)
|
|
26
26
|
else
|
|
27
|
-
errors.each { |key, value| @imposed_errors[key] = value }
|
|
27
|
+
errors.each { |key, value| @imposed_errors[key] = value } if Helpers.has_errors_method?(self)
|
|
28
28
|
end
|
|
29
29
|
end
|
|
30
30
|
|
data/lib/object_attorney.rb
CHANGED
|
@@ -47,7 +47,6 @@ module ObjectAttorney
|
|
|
47
47
|
include Validations
|
|
48
48
|
include NestedObjects
|
|
49
49
|
include Record
|
|
50
|
-
include Translation
|
|
51
50
|
include Representation
|
|
52
51
|
|
|
53
52
|
validate :validate_represented_object
|
|
@@ -59,6 +58,7 @@ module ObjectAttorney
|
|
|
59
58
|
module ClassMethods
|
|
60
59
|
include Naming
|
|
61
60
|
include Delegation
|
|
61
|
+
include Translation
|
|
62
62
|
end
|
|
63
63
|
|
|
64
64
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: object_attorney
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.5.
|
|
4
|
+
version: 2.5.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- João Gonçalves
|
|
@@ -171,3 +171,4 @@ test_files:
|
|
|
171
171
|
- spec/support/models/comment.rb
|
|
172
172
|
- spec/support/models/post.rb
|
|
173
173
|
- spec/support/models/user.rb
|
|
174
|
+
has_rdoc:
|