module ActiveRecord::Encryption::Contexts
def protecting_encrypted_data(&block)
* Reading encrypted content will return its ciphertext.
Runs the provided block in an encryption context where:
def protecting_encrypted_data(&block) with_encryption_context encryptor: ActiveRecord::Encryption::EncryptingOnlyEncryptor.new, frozen_encryption: true, &block end