validation_hints 6.2.0 → 6.2.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: 417c0455d8dedf1c33c7cf608af48ec92ecb6b1d913f60f58ac0d7b91d0eb58d
4
- data.tar.gz: 216254f45fa84b4370828da2830d79689fbd3971da68fa0e4e891873ed40029f
3
+ metadata.gz: 99fb1203ae7e46c6f7df8edf84c00a7b55c6901a0dbd43dcfd9eb2b96acbd9dc
4
+ data.tar.gz: c83cbcab470dba35e53f2d991f5b219e4be2ef33b453649df2498f65b1c4f654
5
5
  SHA512:
6
- metadata.gz: 2a961271d6a978a874745411c8251e8fb255c974917da3dbcaad7e469caada854ef7f9437d0de8972d266348a3d054e5952bb81cd42f5ed3515d1c45d1a435e6
7
- data.tar.gz: 974c699d5c1acaf13dd0494156cd8d46f5628f6b9ef9d874c873804d33d75d6df745fd62fc5fa8db41210cca236f9a5642df2da571dd55ecb5e245527417326d
6
+ metadata.gz: 81b2faea546b51aa257ebb9776993ea9598a8754534deb6f1cce220eb97e9ccb2828bb8eed1d75f11c32073d47d53d20cd4e5685fe2314c34534bbf5f7725454
7
+ data.tar.gz: 67012560801eb03bc7aef5617c04296d518636ab46973a8edb36ae73178765deb347ec36a503c9b7f58be5637345b17d9c4bca5375db42d9f713afc215321193
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  All notable changes to this project are documented here.
4
4
 
5
+ ## 6.2.1
6
+
7
+ ### Fixed
8
+
9
+ - **`ActiveModel::Hints` and frozen validator options:** duplicate `validator.options` and `generate_message` options before mutation so Rails 7 frozen presence validators (`message: :required`) no longer raise `can't modify frozen Hash`.
10
+
5
11
  ## 6.2.0
6
12
 
7
13
  I18n lookup chain and documentation (Phase 2).
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- validation_hints (6.2.0)
4
+ validation_hints (6.2.1)
5
5
  activerecord (>= 7.0, < 7.1)
6
6
 
7
7
  GEM
@@ -264,7 +264,7 @@ CHECKSUMS
264
264
  thor (1.5.0) sha256=e3a9e55fe857e44859ce104a84675ab6e8cd59c650a49106a05f55f136425e73
265
265
  timeout (0.6.1) sha256=78f57368a7e7bbadec56971f78a3f5ecbcfb59b7fcbb0a3ed6ddc08a5094accb
266
266
  tzinfo (2.0.6) sha256=8daf828cc77bcf7d63b0e3bdb6caa47e2272dcfaf4fbfe46f8c3a9df087a829b
267
- validation_hints (6.2.0)
267
+ validation_hints (6.2.1)
268
268
  websocket-driver (0.8.0) sha256=ed0dba4b943c22f17f9a734817e808bc84cdce6a7e22045f5315aa57676d4962
269
269
  websocket-extensions (0.1.5) sha256=1c6ba63092cda343eb53fc657110c71c754c56484aad42578495227d717a8241
270
270
  zeitwerk (2.7.5) sha256=d8da92128c09ea6ec62c949011b00ed4a20242b255293dd66bf41545398f73dd
@@ -167,6 +167,7 @@ module ActiveModel
167
167
  end
168
168
 
169
169
  def generate_message(attribute, type, options = {})
170
+ options = options.dup
170
171
  type = options.delete(:message) if options[:message].is_a?(Symbol)
171
172
  value = (attribute != :base ? @base.read_attribute_for_validation(attribute) : nil)
172
173
 
@@ -202,7 +203,7 @@ module ActiveModel
202
203
 
203
204
  def messages_for_validator(attribute, validator)
204
205
  key = validator_key(validator)
205
- options = validator.options
206
+ options = validator.options.dup
206
207
  result = []
207
208
 
208
209
  if options[:allow_blank] && key == "presence"
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module ValidationHints
3
- VERSION = "6.2.0"
3
+ VERSION = "6.2.1"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: validation_hints
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.2.0
4
+ version: 6.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ace Suares