blsk_ruby_core_api 0.1.2.pre.2 → 0.1.2.pre.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/decoractors/valid.rb +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a426645b1a63d7e3abcd434e2a69051b38f66b99d4e00ecfe9fa5cf0bf4ce76
|
4
|
+
data.tar.gz: 946273cda71e2fe5217cbe3c18b17a15230ee348ca9a7e2d198cdaf113d01b5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d10541d10a85dd0e78278ddfaacee0f127214292e6a0bcf2ade6181d4bfcd675b62ce75899127472daaa162ee7ae42c7901e6eee3a219bc08faab4e75e089bcc
|
7
|
+
data.tar.gz: 8b733a279d5cb7b81a88ae593959d9a1f11270a4f31eaef3bebb05920d71ba8f4c70adad0bcf8f10cb35d798a138559acede2382b71cea516f77e55b57fd2101
|
data/lib/decoractors/valid.rb
CHANGED
@@ -7,10 +7,10 @@ module Validator
|
|
7
7
|
seed_model = args[0]
|
8
8
|
self_rest = args [1]
|
9
9
|
valid_result = check_validate(seed_model, self_rest) # check validation and return [true]/[false, errors]
|
10
|
-
if
|
10
|
+
if valid_result[0]
|
11
11
|
true
|
12
12
|
else
|
13
|
-
|
13
|
+
valid_result[2].response_with_error(CommonError::InvalidData, valid_result[1])
|
14
14
|
end
|
15
15
|
}
|
16
16
|
end
|
@@ -20,7 +20,7 @@ module Validator
|
|
20
20
|
if errors.empty?
|
21
21
|
[true]
|
22
22
|
else
|
23
|
-
errors_response =
|
23
|
+
errors_response = convert_errors_response(errors)
|
24
24
|
[false, errors_response, self_rest]
|
25
25
|
end
|
26
26
|
end
|