Closed 4e4c52 closed 6 years ago
I'm afraid this isn't possible. CryptKeeper relies on ActiveRecord's serialize
method, which doesn't have direct access to the model's instance methods in order to run a query.
I'd recommend adding the key in the same way you've added the salt.
Hello,
I try so setup encrypted fields for a model with the encryption key stored in a related model named Account via
belongs_to
.Here is what I did in the model:
When I create a record, I get the following error:
NoMethodError: undefined method 'account_encryption_key' for #<Class:XXX...>
Is it possible to do what I'm trying?
I'm using CryptKeeper 2.0.0rc1 and Rails 5.2.0rc1.
Thanks!