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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 759a4c27d265a5f1a8dc197e25c23246d44c8ef8
4
- data.tar.gz: cc03e8dd856404c6979afbc911666d3051b25240
3
+ metadata.gz: 974efd389a71d8056c697678020882b71f4b8b2b
4
+ data.tar.gz: 7ff4f5361f8b4121893c5c0224ec2bc45639bbd4
5
5
  SHA512:
6
- metadata.gz: d4f51fa050b5c0eb1015b963a9e98d632b73856efced2966af0fb673abd73bb00e23239d45ab3a02cec4904398092efe8a62e30b9ab5ccc4f4cb9bfff43e4101
7
- data.tar.gz: ec334492290a9c8dcdda3b1e9ee0c08358beb35c2fcd5f102cb651395cc9c759be0140d0952d5ed9cac68178d6fc1eee468a77c873006c2a3f27194648211d7e
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 == :base ? '' : "#{attr_name} ") + error[:error]
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
@@ -1,3 +1,3 @@
1
1
  module ErrorsFullDetails
2
- VERSION = '0.0.2'.freeze
2
+ VERSION = '0.0.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: errors_full_details
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Umar Al-Kfaween