class
ActionText::Attachment
rails latest stable
- Superclass: Object
Action Text Attachment
Attachments serialize attachables to HTML or plain text.
class Person < ApplicationRecord include ActionText::Attachable end attachable = Person.create! name: "Javan" attachment = ActionText::Attachment.from_attachable(attachable) attachment.to_html # => "<action-text-attachment sgid=\"BAh7CEk..."
Included modules
- ActionText::Attachments::Caching
- ActionText::Attachments::Minification
- ActionText::Attachments::TrixConversion
Constants
ATTRIBUTES = %w( sgid content-type url href filename filesize width height previewable presentation caption content )
Attributes
| [R] | attachable |
| [R] | node |
Files
- actiontext/lib/action_text/attachment.rb