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: 2f635564611bf5299054332c630d3a8b79f35df7d7043c2c5fa69916fb9b1c6d
4
- data.tar.gz: f4285094a1ce68e23afbadfa184e15a369b80fc17cf7b7f3c3290d03a33ae0b9
3
+ metadata.gz: 8dcfe4b967c4b3e86b61189140e744bfac77d8dcad89d58eb2109a38edfa11b2
4
+ data.tar.gz: 4508998186812818da3917f68dd53ee63f865664e40f4b6132058f98dfcc9db8
5
5
  SHA512:
6
- metadata.gz: cf8882a6d062c0cb28820fd8fcdd8807033e9a70a7ad870cf601e3358cba9f583d83e42e64a340da811c4d54e20713266c93d21cc23626098aebbbc02491fc64
7
- data.tar.gz: aaabdb88bc3eded9d74a7bdbaac39a2ea3fb7d66a33a7b9fc6cc3e7b2e6d4975b7203feb18e1e4d7f6f0042b5a5755c942d1886d5f1cae5064e3b9daf88e101a
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, **options.except(:before).merge!(attribute2: attr2, value: value))
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, **options.except(:after).merge!(attribute2: attr2, value: value))
36
+ record.errors.add(attribute, :after, value:, attribute2: attr2, after_value: lesser, **options.except(:after))
37
37
  end
38
38
  end
39
39
  end
@@ -1,3 +1,3 @@
1
1
  module CanHasValidations
2
- VERSION = '1.8.2'
2
+ VERSION = '1.9.0'
3
3
  end
@@ -55,5 +55,11 @@ CanHasValidationsTest: test_truth
55
55
  TRANSACTION (0.0ms) begin transaction
56
56
  ---------------------------------
57
57
  CanHasValidationsTest: test_truth
58
+ ---------------------------------
59
+ TRANSACTION (0.0ms) rollback transaction
60
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
61
+ TRANSACTION (0.0ms) begin transaction
62
+ ---------------------------------
63
+ CanHasValidationsTest: test_truth
58
64
  ---------------------------------
59
65
  TRANSACTION (0.0ms) rollback transaction
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.8.2
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-06-18 00:00:00.000000000 Z
11
+ date: 2024-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails