Add support for ActionText::EncryptedRichText#908
Add support for ActionText::EncryptedRichText#908tarellel wants to merge 1 commit intobasecamp:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds Lexxy support for rendering persisted ActionText::EncryptedRichText content so encrypted Action Text bodies display decrypted HTML instead of ciphertext.
Changes:
- Teach
lexxy_rich_textarea_tagto extract HTML fromActionText::EncryptedRichText. - Add a dummy
Notemodel withhas_rich_text :body, encrypted: trueplus supporting schema/migrations. - Add fixtures and a test intended to verify encrypted rich text rendering.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
lib/lexxy/rich_text_area_tag.rb |
Adds special-case handling for ActionText::EncryptedRichText when extracting HTML for the editor value. |
test/helpers/lexxy/tag_helper_test.rb |
Adds a test intended to validate encrypted rich text rendering (currently not exercising the new code path). |
test/fixtures/notes.yml |
Introduces Note fixtures used by the new encrypted rich text scenario. |
test/fixtures/action_text/encrypted_rich_texts.yml |
Adds encrypted rich text fixtures for the Note record (currently contains a broken fixture reference). |
test/dummy/app/models/note.rb |
Adds dummy model declaring encrypted rich text association. |
test/dummy/config/application.rb |
Configures Active Record encryption keys for the dummy app (primary key string length looks incorrect). |
test/dummy/db/migrate/20250517040252_create_action_text_tables.action_text.rb |
Adds action_text_encrypted_rich_texts table creation to the dummy Action Text migration. |
test/dummy/db/migrate/20260320195843_create_notes.rb |
Creates the notes table in the dummy app. |
test/dummy/db/schema.rb |
Reflects the new dummy tables in schema snapshot. |
test/dummy/test/fixtures/notes.yml |
Adds dummy-app test fixtures for notes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5f8a6d9 to
ecd4c23
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Enable usage of ActionText::EncryptedRichText with lexxy. This came up migrating an application I use with encrypted action text content. Its content was displaying only the encrypted values rather than the raw values.
Changed:
has_rich_text :body, encrypted: true