diff --git a/activerecord/lib/active_record/encryption/extended_deterministic_uniqueness_validator.rb b/activerecord/lib/active_record/encryption/extended_deterministic_uniqueness_validator.rb index 0e0c3b36642..8d347dc11b1 100644 --- a/activerecord/lib/active_record/encryption/extended_deterministic_uniqueness_validator.rb +++ b/activerecord/lib/active_record/encryption/extended_deterministic_uniqueness_validator.rb @@ -12,7 +12,7 @@ module ActiveRecord super(record, attribute, value) klass = record.class - if klass.deterministic_encrypted_attributes&.each do |attribute_name| + klass.deterministic_encrypted_attributes&.each do |attribute_name| encrypted_type = klass.type_for_attribute(attribute_name) [ encrypted_type, *encrypted_type.previous_types ].each do |type| encrypted_value = type.serialize(value) @@ -21,7 +21,6 @@ module ActiveRecord end end end - end end end end