Sha256: 0cd5477d3c2fa6157f6d867ee4b5e4eb7d3576f855c684b75dafa68d87cd9c30

Contents?: true

Size: 517 Bytes

Versions: 12

Compression:

Stored size: 517 Bytes

Contents

# frozen_string_literal: true

class Ckeditor::AttachmentFile < Ckeditor::Asset
  has_mongoid_attached_file :data,
                            url: '/ckeditor_assets/attachments/:id/:filename',
                            path: ':rails_root/public/ckeditor_assets/attachments/:id/:filename'

  validates_attachment_presence :data
  validates_attachment_size :data, less_than: 100.megabytes
  do_not_validate_attachment_file_type :data

  def url_thumb
    @url_thumb ||= Ckeditor::Utils.filethumb(filename)
  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/attachment_file.rb
ckeditor-5.1.3 test/tmp/app/models/ckeditor/attachment_file.rb
ckeditor-5.1.2 lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/attachment_file.rb
ckeditor-5.1.2 test/tmp/app/models/ckeditor/attachment_file.rb
ckeditor-5.1.1 test/tmp/app/models/ckeditor/attachment_file.rb
ckeditor-5.1.1 lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/attachment_file.rb
glebtv-ckeditor-4.14.1 lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/attachment_file.rb
ckeditor-5.1.0 lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/attachment_file.rb
glebtv-ckeditor-4.13.1 lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/attachment_file.rb
glebtv-ckeditor-4.13.0 lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/attachment_file.rb
ckeditor-5.0.0 lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/attachment_file.rb
ckeditor-5.0.0 test/tmp/app/models/ckeditor/attachment_file.rb