Sha256: 6945d4fca16d2b683eb561936a449a3f545a7a6de911e08f02b6046f001bc428

Contents?: true

Size: 493 Bytes

Versions: 8

Compression:

Stored size: 493 Bytes

Contents

# frozen_string_literal: true

class Ckeditor::AttachmentFile < Ckeditor::Asset
  has_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

8 entries across 8 versions & 2 rubygems

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