enum_attributes_validation 0.1.3 → 0.1.5
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/Gemfile.lock +1 -1
- 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: eed35f8975e88da59799c9a0b5a7d19b02c8ca7d
|
4
|
+
data.tar.gz: 85edbfc87a7659119da0026eedb89b0eca189402
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3fc1d9ad49012fa445ce4198db2c19481089a281a11f17b56d26a093f196bb64df11e3566730f812ace372e2fe56fc8911f95ff0473af529c925d32c6428c9b
|
7
|
+
data.tar.gz: e8e9f75fc20545aef52d7fb819c3351a38983d79c534894cc4b08660b8fbba4c8d0e14eb1a31f74eeccd382bada953aab92e67d5ad73108ec8376210f10ddb51
|
data/Gemfile.lock
CHANGED
@@ -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
|
34
|
-
self.enum_invalid_attributes[attribute] = string_argument unless
|
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)
|
35
35
|
end
|
36
36
|
end
|
37
37
|
end
|