Method: ActionMosaico::Attachable#to_rich_text_attributes
- Defined in:
- lib/action_mosaico/attachable.rb
#to_rich_text_attributes(attributes = {}) ⇒ Object
79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/action_mosaico/attachable.rb', line 79 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] = [:width] attrs[:height] = [:height] end.compact end |