morse_fields_validator 1.1.6 → 1.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/.fields_validator.rb.swp +0 -0
- data/lib/fields_validator.rb +5 -3
- data/lib/morse_fields_validator/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: 7da678fba665d9e6213556534125c8bddaa99c17
|
4
|
+
data.tar.gz: 509f9535b741b94e7cabceb1a346c5fb03892020
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31c3042b9c4f7282449f6041dac72c37b24aba34698ff9dd9c6a463545167f26621285f1ddb4401a1a9af6bbca5eb9fe3e83751f128eeec010ed04f36306266f
|
7
|
+
data.tar.gz: 01c2bec4b757ecf481e55e7e9da7d0664baba92370d03fdc67cf7c31e29d22b08d3d95b979ba05c7c1f1c820d8f989df42e3532bc6208f1a5ac51575a1e81e37
|
Binary file
|
data/lib/fields_validator.rb
CHANGED
@@ -8,9 +8,11 @@ module FieldsValidator
|
|
8
8
|
|
9
9
|
class_methods do
|
10
10
|
def validate_required_attributes
|
11
|
-
required_attributes
|
12
|
-
|
13
|
-
|
11
|
+
if required_attributes and required_attributes.any?
|
12
|
+
required_attributes.each do |a|
|
13
|
+
validates a.to_sym, presence: true
|
14
|
+
end
|
15
|
+
end
|
14
16
|
end
|
15
17
|
|
16
18
|
def required_attributes
|