This is designed to work with https://github.com/PagerTree/attr_encrypted/tree/rails-7-0-support as attr_encrypted
normally can't coexist with Rails 7.
It will allow you to add encrypts
and migrate_encryption_for
to your models, migrate, and finally remove everything but the encrypts
lines.
You probably also want to set
config.active_record.encryption.key_provider = ActiveRecord::Encryption::EnvelopeEncryptionKeyProvider.new
in application.rb
.