method

render_action_text_attachment

Importance_0
v7.1.3.2 - Show latest stable - 0 notes - Class: ContentHelper
render_action_text_attachment(attachment, locals: {}) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actiontext/app/helpers/action_text/content_helper.rb, line 43
    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
Register or log in to add new notes.