can_has_validations 1.8.2 → 1.9.0
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8dcfe4b967c4b3e86b61189140e744bfac77d8dcad89d58eb2109a38edfa11b2
|
4
|
+
data.tar.gz: 4508998186812818da3917f68dd53ee63f865664e40f4b6132058f98dfcc9db8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b17012db725878e4c58b5f8a89873383495db9bdbe8cdfcae2ada270392c3ba86cff232b2b79a01ae665b5424bbe5013d3a7f2c12fa77fe391e389add99352e7
|
7
|
+
data.tar.gz: 40d25e2f3ddd9f24fa8465fadc90595e8013dcd0af003bd4ccd84d6626fe1fbbf47d1ae0a22fcfd9fa1b6af820e4c809835dbd5d47b913107d20f1c48918a790
|
@@ -18,7 +18,7 @@ module ActiveModel::Validations
|
|
18
18
|
next unless value && greater
|
19
19
|
unless value < greater
|
20
20
|
attr2 = attr_name.respond_to?(:call) ? 'it is' : record.class.human_attribute_name(attr_name)
|
21
|
-
record.errors.add(attribute, :before,
|
21
|
+
record.errors.add(attribute, :before, value:, attribute2: attr2, before_value: greater, **options.except(:before))
|
22
22
|
end
|
23
23
|
end
|
24
24
|
end
|
@@ -33,7 +33,7 @@ module ActiveModel::Validations
|
|
33
33
|
next unless value && lesser
|
34
34
|
unless value > lesser
|
35
35
|
attr2 = attr_name.respond_to?(:call) ? 'it is' : record.class.human_attribute_name(attr_name)
|
36
|
-
record.errors.add(attribute, :after,
|
36
|
+
record.errors.add(attribute, :after, value:, attribute2: attr2, after_value: lesser, **options.except(:after))
|
37
37
|
end
|
38
38
|
end
|
39
39
|
end
|
data/test/dummy/log/test.log
CHANGED
@@ -55,5 +55,11 @@ CanHasValidationsTest: test_truth
|
|
55
55
|
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
|
56
56
|
---------------------------------
|
57
57
|
CanHasValidationsTest: test_truth
|
58
|
+
---------------------------------
|
59
|
+
[1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
|
60
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
61
|
+
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
|
62
|
+
---------------------------------
|
63
|
+
CanHasValidationsTest: test_truth
|
58
64
|
---------------------------------
|
59
65
|
[1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: can_has_validations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- thomas morgan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|