instance method render_action_text_attachments

Ruby on Rails 7.1.6

Since v6.0.6

Available in: v6.0.6 v6.1.7.10 v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

render_action_text_attachments(content)

No documentation comment.

Parameters

content req
Source
# File actiontext/app/helpers/action_text/content_helper.rb, line 35
    def render_action_text_attachments(content)
      content.render_attachments do |attachment|
        unless attachment.in?(content.gallery_attachments)
          attachment.node.tap do |node|
            node.inner_html = render_action_text_attachment attachment, locals: { in_gallery: false }
          end
        end
      end.render_attachment_galleries do |attachment_gallery|
        render(layout: attachment_gallery, object: attachment_gallery) do
          attachment_gallery.attachments.map do |attachment|
            attachment.node.inner_html = render_action_text_attachment attachment, locals: { in_gallery: true }
            attachment.to_html
          end.join.html_safe
        end.chomp
      end
    end

Defined in actiontext/app/helpers/action_text/content_helper.rb line 35 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionText::ContentHelper

Type at least 2 characters to search.

↑↓ navigate · open · esc close