instance method to_rich_text_attributes

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

to_rich_text_attributes(attributes = {})

No documentation comment.

Parameters

attributes opt = {}
Source
# File actiontext/lib/action_text/attachable.rb, line 129
    def to_rich_text_attributes(attributes = {})
      attributes.dup.tap do |attrs|
        attrs[:sgid] = attachable_sgid
        attrs[:content_type] = attachable_content_type
        attrs[:previewable] = true if previewable_attachable?
        attrs[:filename] = attachable_filename
        attrs[:filesize] = attachable_filesize
        attrs[:width] = attachable_metadata[:width]
        attrs[:height] = attachable_metadata[:height]
      end.compact
    end

Defined in actiontext/lib/action_text/attachable.rb line 129 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionText::Attachable

Type at least 2 characters to search.

↑↓ navigate · open · esc close