123456789_123456789_123456789_123456789_123456789_

Module: ActionText::Attachments::TrixConversion

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Included In:
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Defined in: actiontext/lib/action_text/attachments/trix_conversion.rb

Class Method Summary

::ActiveSupport::Concern - Extended

class_methods

Define class methods from given block.

included

Evaluate given block in context of base class, so that you can write class macros here.

prepended

Evaluate given block in context of base class, so that you can write class macros here.

Instance Method Summary

Instance Method Details

#to_trix_attachment(content = trix_attachment_content)

[ GitHub ]

  
# File 'actiontext/lib/action_text/attachments/trix_conversion.rb', line 22

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