From 4fa56814f18fd3da49c83931fa773caa727d8096 Mon Sep 17 00:00:00 2001 From: eileencodes Date: Wed, 3 Jul 2024 08:41:48 -0400 Subject: [PATCH] fix newlines New lines for these were off, only the new options were put on a new line so the code looked awkward. I'd rather just oneline it. --- .../lib/active_record/encryption/encryptable_record.rb | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/activerecord/lib/active_record/encryption/encryptable_record.rb b/activerecord/lib/active_record/encryption/encryptable_record.rb index 5ea045d152ae7..623c03db4bdf2 100644 --- a/activerecord/lib/active_record/encryption/encryptable_record.rb +++ b/activerecord/lib/active_record/encryption/encryptable_record.rb @@ -46,13 +46,11 @@ module EncryptableRecord # * :previous - List of previous encryption schemes. When provided, they will be used in order when trying to read # the attribute. Each entry of the list can contain the properties supported by #encrypts. Also, when deterministic # encryption is used, they will be used to generate additional ciphertexts to check in the queries. - def encrypts(*names, key_provider: nil, key: nil, deterministic: false, support_unencrypted_data: nil, downcase: false, ignore_case: false, previous: [], - compress: true, compressor: nil, **context_properties) + def encrypts(*names, key_provider: nil, key: nil, deterministic: false, support_unencrypted_data: nil, downcase: false, ignore_case: false, previous: [], compress: true, compressor: nil, **context_properties) self.encrypted_attributes ||= Set.new # not using :default because the instance would be shared across classes names.each do |name| - encrypt_attribute name, key_provider: key_provider, key: key, deterministic: deterministic, support_unencrypted_data: support_unencrypted_data, downcase: downcase, ignore_case: ignore_case, previous: previous, - compress: compress, compressor: compressor, **context_properties + encrypt_attribute name, key_provider: key_provider, key: key, deterministic: deterministic, support_unencrypted_data: support_unencrypted_data, downcase: downcase, ignore_case: ignore_case, previous: previous, compress: compress, compressor: compressor, **context_properties end end @@ -83,8 +81,7 @@ def global_previous_schemes_for(scheme) end end - def encrypt_attribute(name, key_provider: nil, key: nil, deterministic: false, support_unencrypted_data: nil, downcase: false, ignore_case: false, previous: [], - compress: true, compressor: nil, **context_properties) + def encrypt_attribute(name, key_provider: nil, key: nil, deterministic: false, support_unencrypted_data: nil, downcase: false, ignore_case: false, previous: [], compress: true, compressor: nil, **context_properties) encrypted_attributes << name.to_sym decorate_attributes([name]) do |name, cast_type|