method

attachments

Importance_1
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: Content
attachments() public

Extracts +ActionText::Attachment+s from the HTML fragment:

attachable = ActiveStorage::Blob.first html = %Q(<action-text-attachment sgid="#{attachable.attachable_sgid}" caption="Captioned"></action-text-attachment>) content = ActionText::Content.new(html) content.attachments # => [#<ActionText::Attachment attachable=#<ActiveStorage::Blob...
Show source
Register or log in to add new notes.