enum_attributes_validation 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/enum_attributes_validation.rb +2 -2
- data/lib/enum_attributes_validation/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2fd6e05a56f58024f5393bc168563c041e1954b5
|
4
|
+
data.tar.gz: 22209197eed9c900e6230fbd3f3d58235093a8f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c16cb855fab91a5c1d0cf188f00e26c67b76bbdc4260459bc7eaf494930be6cb2982b7b155c36bab78632b1d70e9e98db34404cc77b3759f682155f484e551a
|
7
|
+
data.tar.gz: 07776dece012a1663646221c2f3e844b1205c14648fc89f17dcfb62161f0af6b20bd96e068fa28ba7abb97263360d170b0c8908f0adbd4f82f838bfce48e69d8
|
@@ -30,8 +30,8 @@ module EnumAttributesValidation
|
|
30
30
|
|
31
31
|
define_method (string_attribute+"=").to_sym do |argument|
|
32
32
|
string_argument = argument.to_s
|
33
|
-
self[string_attribute] = string_argument if self.send(string_attribute.pluralize).keys.include?(string_argument)
|
34
|
-
self.enum_invalid_attributes[attribute] = string_argument unless self.send(string_attribute.pluralize).keys.include?(string_argument)
|
33
|
+
self[string_attribute] = string_argument if self.class.send(string_attribute.pluralize).keys.include?(string_argument)
|
34
|
+
self.enum_invalid_attributes[attribute] = string_argument unless self.class.send(string_attribute.pluralize).keys.include?(string_argument)
|
35
35
|
end
|
36
36
|
end
|
37
37
|
end
|