errors_full_details 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/errors_full_details/core_ext.rb +1 -2
- data/lib/errors_full_details/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: 974efd389a71d8056c697678020882b71f4b8b2b
|
4
|
+
data.tar.gz: 7ff4f5361f8b4121893c5c0224ec2bc45639bbd4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e972e2dcf618c34f0b170ceb361edaaff5e4be239082be546fc5eda954ca94d38a807b2e6bf939c005b59fbc1ccf715a8e22c2b0b58de55a274221d375cb028
|
7
|
+
data.tar.gz: a031c8e90774c4a5080ccf8c6ff126c797001e4ae8d133127cd52dea6bd738810b579fc7149b2b3dedd721ccbddf2381a7b8eef1559269a2cdb06bb457439d86
|
@@ -2,9 +2,8 @@ module ActiveModel
|
|
2
2
|
class Errors
|
3
3
|
def full_details
|
4
4
|
details.each_with_object([]) do |(attr, error_arr), errors|
|
5
|
-
attr_name = attr.to_s.humanize
|
6
5
|
error_arr.each do |error|
|
7
|
-
message = (attr
|
6
|
+
message = full_message(attr, error[:error])
|
8
7
|
code = error.key?(:code) ? error[:code].to_s : '0'
|
9
8
|
errors << { message: message, code: code }
|
10
9
|
end
|