Sha256: aba225c70ebb04e0cacb9f2d5842d9b45c6edabbe62096f74e3343289aaeda2a

Contents?: true

Size: 601 Bytes

Versions: 12

Compression:

Stored size: 601 Bytes

Contents

# frozen_string_literal: true

class Ckeditor::Picture < Ckeditor::Asset
  has_mongoid_attached_file :data,
                            url: '/ckeditor_assets/pictures/:id/:style_:basename.:extension',
                            path: ':rails_root/public/ckeditor_assets/pictures/:id/:style_:basename.:extension',
                            styles: { content: '800>', thumb: '118x100#' }

  validates_attachment_size :data, less_than: 2.megabytes
  validates_attachment_presence :data
  validates_attachment_content_type :data, content_type: /\Aimage/

  def url_content
    url(:content)
  end
end

Version data entries

12 entries across 8 versions & 2 rubygems

Version Path
ckeditor-5.1.3 lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/picture.rb
ckeditor-5.1.3 test/tmp/app/models/ckeditor/picture.rb
ckeditor-5.1.2 lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/picture.rb
ckeditor-5.1.2 test/tmp/app/models/ckeditor/picture.rb
ckeditor-5.1.1 test/tmp/app/models/ckeditor/picture.rb
ckeditor-5.1.1 lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/picture.rb
glebtv-ckeditor-4.14.1 lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/picture.rb
ckeditor-5.1.0 lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/picture.rb
glebtv-ckeditor-4.13.1 lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/picture.rb
glebtv-ckeditor-4.13.0 lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/picture.rb
ckeditor-5.0.0 lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/picture.rb
ckeditor-5.0.0 test/tmp/app/models/ckeditor/picture.rb