method
render_action_text_attachment
v7.2.3 -
Show latest stable
- Class:
ActionText::ContentHelper
render_action_text_attachment(attachment, locals: {})public
No documentation available.
# File actiontext/app/helpers/action_text/content_helper.rb, line 54
def render_action_text_attachment(attachment, locals: {}) # :nodoc:
options = { locals: locals, object: attachment, partial: attachment }
if attachment.respond_to?(:to_attachable_partial_path)
options[:partial] = attachment.to_attachable_partial_path
end
if attachment.respond_to?(:model_name)
options[:as] = attachment.model_name.element
end
render(**options).chomp
end