File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
actiontext/lib/action_text Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
# frozen_string_literal: true
2
2
3
3
module ActionText
4
- # = Action Text Attachable
4
+ # = Action Text \ Attachable
5
5
#
6
6
# Include this module to make a record attachable to an <tt>ActionText::Content</tt>.
7
7
#
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ def links
53
53
@links ||= fragment . find_all ( "a[href]" ) . map { |a | a [ "href" ] } . uniq
54
54
end
55
55
56
- # Extracts ActionText::Attachments from the HTML fragment:
56
+ # Extracts <tt> ActionText::Attachment</tt>s from the HTML fragment:
57
57
#
58
58
# attachable = ActiveStorage::Blob.first
59
59
# html = %Q(<action-text-attachment sgid="#{attachable.attachable_sgid}" caption="Captioned"></action-text-attachment>)
@@ -75,12 +75,12 @@ def gallery_attachments
75
75
@gallery_attachments ||= attachment_galleries . flat_map ( &:attachments )
76
76
end
77
77
78
- # Extracts ActionText::Attachables from the HTML fragment:
78
+ # Extracts <tt> ActionText::Attachable</tt>s from the HTML fragment:
79
79
#
80
80
# attachable = ActiveStorage::Blob.first
81
81
# html = %Q(<action-text-attachment sgid="#{attachable.attachable_sgid}" caption="Captioned"></action-text-attachment>)
82
82
# content = ActionText::Content.new(html)
83
- # content.attachables # => [#<ActiveStorage::Blob...
83
+ # content.attachables # => [attachable]
84
84
def attachables
85
85
@attachables ||= attachment_nodes . map do |node |
86
86
ActionText ::Attachable . from_node ( node )
You can’t perform that action at this time.
0 commit comments