feat: Support encrypted ActionText attributes#1667
Merged
matsales28 merged 1 commit intothoughtbot:mainfrom Aug 8, 2025
Merged
feat: Support encrypted ActionText attributes#1667matsales28 merged 1 commit intothoughtbot:mainfrom
matsales28 merged 1 commit intothoughtbot:mainfrom
Conversation
ba4d363 to
fb0493e
Compare
Member
|
Hi @spdawson, just letting you know that I saw your PR and will review it as soon as I can! |
matsales28
reviewed
May 23, 2025
Member
matsales28
left a comment
There was a problem hiding this comment.
There's a failure in the spec. The encrpted_rich_text_is_defined? method is not available inside of the define_model block. @spdawson
When rich text attributes are declared by passing `encrypted: true` to `has_rich_text`, the attribute class will be `ActionText::EncryptedRichText` rather than the `ActionText::RichText` base class. Extend the existing `have_rich_text` matcher such that it will continue to match, even when rich text attributes are specified with the `encrypted: true` option. Refs: thoughtbot#1263
fb0493e to
2ccb661
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Synopsis
When rich text attributes are declared by passing
encrypted: truetohas_rich_text, the attribute class will beActionText::EncryptedRichTextrather than theActionText::RichTextbase class.Extend the existing
have_rich_textmatcher such that it will continue to match, even when rich text attributes are specified with theencrypted: trueoption.Extends work done in #1263.