method

with_encryption_context

Importance_1
v7.1.3.2 - Show latest stable - 0 notes - Class: Contexts
with_encryption_context(properties) public

Configures a custom encryption context to use when running the provided block of code.

It supports overriding all the properties defined in Context.

Example:

ActiveRecord::Encryption.with_encryption_context(encryptor: ActiveRecord::Encryption::NullEncryptor.new) do
  ...
end

Encryption contexts can be nested.

Show source
Register or log in to add new notes.