README.md in lockbox-0.4.0 vs README.md in lockbox-0.4.1

- old
+ new

@@ -45,10 +45,11 @@ Then follow the instructions below for the data you want to encrypt. #### Database Fields - [Active Record](#active-record) +- [Action Text](#action-text) - [Mongoid](#mongoid) #### Files - [Active Storage](#active-storage) @@ -182,9 +183,41 @@ ```ruby class User < ApplicationRecord blind_index :email, migrating: true end ``` + +## Action Text + +Create a migration with: + +```ruby +class AddBodyCiphertextToRichTexts < ActiveRecord::Migration[6.0] + def change + add_column :action_text_rich_texts, :body_ciphertext, :text + end +end +``` + +Create `config/initializers/lockbox.rb` with: + +```ruby +Lockbox.encrypts_action_text_body(migrating: true) +``` + +Migrate existing data: + +```ruby +Lockbox.migrate(ActionText::RichText) +``` + +Update the initializer: + +```ruby +Lockbox.encrypts_action_text_body +``` + +And drop the unencrypted column. ## Mongoid Add to your model: