json_errors 0.3.0 → 0.3.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7c99a5f50d67dca55fc3e9036cfb1bd15e6841854ca519483c125b462ab51ed6
4
- data.tar.gz: 6a8a22c8d685768a1d402b053cf2f05c9e2ccb2ed1548dd04cad91fe476b0f11
3
+ metadata.gz: 4c7bb942cf5ede276351ed16f0730c356a901a0892ba4b8d64afb0db71d6f797
4
+ data.tar.gz: 586832722858d41b3ee436cdac4407428c2a3cf2fb9c3f9fffd1934177ecd189
5
5
  SHA512:
6
- metadata.gz: a6f9740644d854414e3dd678b426249cdcd5649453ef7bb3547b007f0e464cfcedce422ec94b61b7242c8995585aafc1a195ed5786463287f19a89fc269fd1a9
7
- data.tar.gz: 62579f1a161e3fbb64ee3dee6c9eac9ebaaaa247644390cb7eaaba2e6bc3d1fd360d9d058b99a0ad59fc512a4213e40c790f7f1888bbd852fddb01e9ffecb83f
6
+ metadata.gz: caa154ab9fed780b387f8d726663455598e2e13ebf9c8fab5126aec955098e62a199c640771892f53bb7c448a86e6c26707a19eb19a0c49ba595415b4ab88414
7
+ data.tar.gz: 64d0d4bc21882a908aa4b871e3f872ca0164ff577c5ae44c36d6186309751897d8f4a202c72e9bedb051fe527872261bcd77204cfe0225cefe66edbb51422709
data/.gitignore CHANGED
@@ -10,3 +10,4 @@
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
12
  workspace.code-workspace
13
+ *.gem
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.3.1] - 2025-02-27
4
+
5
+ - bugfix: Wrong ActiveRecord error format
6
+
7
+ ## [0.3.0] - 2025-02-27
8
+
9
+ - Update with ActiveRecord validation errors to Rails 8
10
+
3
11
  ## [0.2.1] - 2021-08-03
4
12
 
5
13
  - Error log formatting fixed
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- json_errors (0.2.1)
5
- activesupport (>= 8.0.0)
4
+ json_errors (0.3.0)
5
+ activesupport (~> 8.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
@@ -24,8 +24,8 @@ module JsonErrors
24
24
 
25
25
  def payload
26
26
  validation_payload = []
27
- record.errors.each do |key, messages|
28
- validation_payload << { key => messages }
27
+ record.errors.each do |error|
28
+ validation_payload << { error.attribute => error.message }
29
29
  end
30
30
 
31
31
  { record.class.to_s => validation_payload }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JsonErrors
4
- VERSION = '0.3.0'
4
+ VERSION = '0.3.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json_errors
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Łukasz Pająk