Sha256: f599d39506b88b30e85fa9a8b6edc8175c48d310881b2ba59f9a5c286cc64d32

Contents?: true

Size: 368 Bytes

Versions: 8

Compression:

Stored size: 368 Bytes

Contents

# frozen_string_literal: true

class Ckeditor::Picture < Ckeditor::Asset
  validates_property :format, of: :data, in: image_file_types unless image_file_types.empty?
  validates_property :image?, of: :data, as: true, message: :invalid

  def url_content
    data.thumb('800x800>').url
  end

  def url_thumb
    data.thumb('118x100#').url(url_thumb_options)
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
ckeditor-5.1.3 lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/picture.rb
ckeditor-5.1.2 lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/picture.rb
ckeditor-5.1.1 lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/picture.rb
glebtv-ckeditor-4.14.1 lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/picture.rb
ckeditor-5.1.0 lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/picture.rb
glebtv-ckeditor-4.13.1 lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/picture.rb
glebtv-ckeditor-4.13.0 lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/picture.rb
ckeditor-5.0.0 lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/picture.rb