method

to_html

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

Converts the attachment to HTML.

attachable = Person.create! name: "Javan"
attachment = ActionText::Attachment.from_attachable(attachable)
attachment.to_html # => "<action-text-attachment sgid=\"BAh7CEk...
Show source
Register or log in to add new notes.