aboutsummaryrefslogtreecommitdiffstats
path: root/actiontext/test/unit
Commit message (Collapse)AuthorAgeFilesLines
* Implement ActiveStorage::Blob#attachable_plain_text_representationGeorge Claghorn2019-07-071-0/+5
| | | | | | Fixes that file attachments without captions would not be represented in plain text generated from rich-text content, causing ActionText::RichText#present? to return false. Closes #36607.
* Deduplicate ActionText::RichText embedsGeorge Claghorn2019-05-171-0/+9
| | | | Fix that an ActiveRecord::RecordNotUnique error would be raised when saving rich-text content with the same file attached multiple times.
* Avoid creating ActionText::RichText records unnecessarilyGeorge Claghorn2019-03-231-0/+8
| | | | Assigning a has_one association for a persisted record saves the change immediately, so attempting to read a rich-text attribute on a persisted record without a corresponding ActionText::RichText would eagerly create one. Avoid assigning the rich text association to fix.
* Fix updating rich text via nested attributesGeorge Claghorn2019-03-171-1/+15
| | | Closes #35159.
* Adds default trix partialChris Oliver2019-03-051-1/+7
|
* Fix error saving Action Text content containing non-blob attachablesJavan Makhmali2019-01-251-0/+9
| | | | | | | | | | Failing test before the ActionText::RichText change: ``` Error: ActionText::ModelTest#test_embed_extraction_only_extracts_file_attachments: ArgumentError: Could not find or build blob: expected attachable, got #<ActionText::Attachables::RemoteImage:0x00007fb0259fef70 @url="http://example.com/cat.jpg", @content_type="image", @width=nil, @height=nil> ```
* Import Action TextGeorge Claghorn2019-01-045-0/+400