interactor-validation 0.3.6 → 0.3.7

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: d64db62a988b24630b88924e39bd64572401aed52a3b699bca548597cf1411a6
4
- data.tar.gz: 5ce8276f8ee1835f5252c1d0e60bbda9044b5b734a4bc116dbb25af4956ceb1b
3
+ metadata.gz: d6d255c1cdb4048fbd485a9bc8b95096d521e592e6babe4ea7961ec429312386
4
+ data.tar.gz: a9bc28cb3c10f5f2415da43c3a63b8c774436e13d27e2e6facaaa0cbcbeb19b9
5
5
  SHA512:
6
- metadata.gz: 2b80e35d7331bc9a4c7e10ee91aafde1b9aadae697aa0fb4f7a77fc7fb815452bcec8ce1e8d1cd855f98a38c18d3f22916936721fff06485d1434dac05a47130
7
- data.tar.gz: 6ad6c3c9138866af06e42a25560f8c7cd49fbdd3cce497c1e5c6b301fd8d0edfaa270c45a1dac4929c57fdd18fd42773b3a22338ade9f2b23763575fa6d8c2a6
6
+ metadata.gz: f5e73c0e35a659668dd31783d5fbea0869f54efe3db2d1033320c66d90fe9fb7997a2fc7079b602608ac6aa1bec60467588ba4b6fdea6bdd3b890cd24ea55bf5
7
+ data.tar.gz: 7da53549b4bd1ef65065b9480dca243f1a78922045f096281025f7e35a034c8418ce88c90cac698fd6dd8816a9c434e23050b88a42701d96803e2bcf73d8f78a
@@ -493,16 +493,15 @@ module Interactor
493
493
  if current_config.error_mode == :code
494
494
  # Code mode: use custom message or generate code
495
495
  code_message = custom_message || error_code_for(error_type, **interpolations)
496
- errors.add(attribute_path, code_message)
496
+ errors.add(attribute_path, code_message, halt: halt)
497
497
  elsif custom_message
498
498
  # Default mode: use ActiveModel's error messages with custom message
499
- errors.add(attribute_path, custom_message)
499
+ errors.add(attribute_path, custom_message, halt: halt)
500
500
  else
501
- errors.add(attribute_path, error_type, **interpolations)
501
+ errors.add(attribute_path, error_type, halt: halt, **interpolations)
502
502
  end
503
503
 
504
- # Set halt flag if requested
505
- @halt_validation = true if halt
504
+ # Note: halt flag is set by ErrorsWrapper.add() if halt: true
506
505
  end
507
506
  # rubocop:enable Metrics/ParameterLists
508
507
 
@@ -701,16 +700,15 @@ module Interactor
701
700
  if current_config.error_mode == :code
702
701
  # Code mode: use custom message or generate code
703
702
  code_message = custom_message || error_code_for(error_type, **interpolations)
704
- errors.add(param_name, code_message)
703
+ errors.add(param_name, code_message, halt: halt)
705
704
  elsif custom_message
706
705
  # Default mode: use ActiveModel's error messages
707
- errors.add(param_name, custom_message)
706
+ errors.add(param_name, custom_message, halt: halt)
708
707
  else
709
- errors.add(param_name, error_type, **interpolations)
708
+ errors.add(param_name, error_type, halt: halt, **interpolations)
710
709
  end
711
710
 
712
- # Set halt flag if requested
713
- @halt_validation = true if halt
711
+ # Note: halt flag is set by ErrorsWrapper.add() if halt: true
714
712
  end
715
713
 
716
714
  # Generate error code for :code mode using constants
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Interactor
4
4
  module Validation
5
- VERSION = "0.3.6"
5
+ VERSION = "0.3.7"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: interactor-validation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wilson Anciro