instance method
render_attachment
Ruby on Rails edge
Since edgeSignature
render_attachment(attachment, attachment_links: false)
Returns an element holding attachment‘s Markdown, for `ActionText::Content#to_markdown` to substitute in place of the attachment. #node_to_markdown emits the element’s text verbatim rather than escaping it as ordinary Markdown source.
Parameters
-
attachmentreq -
attachment_linkskey = false
Source
# File actiontext/lib/action_text/markdown_conversion.rb, line 55
def render_attachment(attachment, attachment_links: false)
ActionText::HtmlConversion.create_element(RAW_MARKDOWN_TAG_NAME).tap do |node|
node.content = attachment.to_markdown(attachment_links: attachment_links)
end
end
Defined in actiontext/lib/action_text/markdown_conversion.rb line 55
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionText::MarkdownConversion