Skip to content

Commit 7600f6a

Browse files
committed
Remove unnecessary if in ExtendedDeterministicUniquenessValidator
1 parent 1e250e6 commit 7600f6a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

activerecord/lib/active_record/encryption/extended_deterministic_uniqueness_validator.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def validate_each(record, attribute, value)
1212
super(record, attribute, value)
1313

1414
klass = record.class
15-
if klass.deterministic_encrypted_attributes&.each do |attribute_name|
15+
klass.deterministic_encrypted_attributes&.each do |attribute_name|
1616
encrypted_type = klass.type_for_attribute(attribute_name)
1717
[ encrypted_type, *encrypted_type.previous_types ].each do |type|
1818
encrypted_value = type.serialize(value)
@@ -21,7 +21,6 @@ def validate_each(record, attribute, value)
2121
end
2222
end
2323
end
24-
end
2524
end
2625
end
2726
end

0 commit comments

Comments
 (0)