Module: ActionText::Attachments::TrixConversion

Extended by:
ActiveSupport::Concern
Included in:
ActionText::Attachment
Defined in:
lib/action_text/attachments/trix_conversion.rb

Instance Method Summary collapse

Instance Method Details

#to_trix_attachment(content = trix_attachment_content) ⇒ Object



20
21
22
23
24
# File 'lib/action_text/attachments/trix_conversion.rb', line 20

def to_trix_attachment(content = trix_attachment_content)
  attributes = full_attributes.dup
  attributes["content"] = content if content
  TrixAttachment.from_attributes(attributes)
end