Module: ActionText::Attachments::TrixConversion
| Relationships & Source Files | |
| Extension / Inclusion / Inheritance Descendants | |
|
Included In:
| |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
self,
::ActiveSupport::Concern
|
|
| 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. |
| append_features, prepend_features | |
Instance Method Summary
Instance Method Details
#to_trix_attachment(content = trix_attachment_content)
[ GitHub ]# File 'actiontext/lib/action_text/attachments/trix_conversion.rb', line 24
def (content = ) attributes = full_attributes.dup attributes["content"] = content if content TrixAttachment.from_attributes(attributes) end
#trix_attachment_content (private)
[ GitHub ]# File 'actiontext/lib/action_text/attachments/trix_conversion.rb', line 31
def if partial_path = attachable.try(:) ActionText::Content.render(partial: partial_path, formats: :html, object: self, as: model_name.element) end end