From 03896723c0a62afb5df5fa16c322835481478bae Mon Sep 17 00:00:00 2001 From: Toby Privett Date: Wed, 1 Dec 2021 11:47:10 +0000 Subject: [PATCH] Prefer `ActiveModel::Errors#add` over `<<` Ref: https://api.rubyonrails.org/v6.1.4/classes/ActiveModel/Errors.html#method-i-add --- app/forms/waste_carriers_engine/base_form.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/forms/waste_carriers_engine/base_form.rb b/app/forms/waste_carriers_engine/base_form.rb index 0b9894bb4..dac203499 100644 --- a/app/forms/waste_carriers_engine/base_form.rb +++ b/app/forms/waste_carriers_engine/base_form.rb @@ -71,7 +71,7 @@ def transient_registration_valid? return if transient_registration.valid? transient_registration.errors.each do |_attribute, message| - errors[:base] << message + errors.add(:base, message) end end