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 +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +2 -2
- data/lib/active_model/hints.rb +2 -1
- data/lib/validation_hints/version.rb +1 -1
- 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: 99fb1203ae7e46c6f7df8edf84c00a7b55c6901a0dbd43dcfd9eb2b96acbd9dc
|
|
4
|
+
data.tar.gz: c83cbcab470dba35e53f2d991f5b219e4be2ef33b453649df2498f65b1c4f654
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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.
|
|
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.
|
|
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
|
data/lib/active_model/hints.rb
CHANGED
|
@@ -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"
|