From 82a5a0b70d8ae0d420ac06bf4c13e4eea2e7dc08 Mon Sep 17 00:00:00 2001 From: Karol Galanciak Date: Thu, 3 Oct 2024 18:22:21 +0200 Subject: [PATCH] fixes --- lib/crypt_keeper/model.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/crypt_keeper/model.rb b/lib/crypt_keeper/model.rb index 7a18ed1..0d286b0 100644 --- a/lib/crypt_keeper/model.rb +++ b/lib/crypt_keeper/model.rb @@ -69,7 +69,11 @@ def crypt_keeper(*args) end crypt_keeper_fields.each do |field| - serialize field, encryptor + if CryptKeeper.active_record_7_1? + serialize field, coder: encryptor + else + serialize field, encryptor + end end end @@ -120,7 +124,7 @@ def decrypt_table! def encryptor_klass @encryptor_klass ||= "CryptKeeper::Provider::#{crypt_keeper_encryptor.to_s.camelize}".constantize rescue NameError - # couldn’t constantize... + # couldn’t constantize... nil end