method
attachments
v8.1.1 -
Show latest stable
- Class:
ActionText::Content
attachments()public
Extracts ActionText::Attachment objects 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...