Sha256: 5d52f2d0e875977174357f62a1b7acfe72eaf9d0242c3bf626bd837ab7b5556c

Contents?: true

Size: 422 Bytes

Versions: 10

Compression:

Stored size: 422 Bytes

Contents

# frozen_string_literal: true

module Ckeditor
  class AttachmentFileUploader < Shrine
    plugin :validation_helpers

    Attacher.validate do
      validate_max_size 100.megabytes
    end
  end

  class AttachmentFile < Ckeditor::Asset
    include AttachmentFileUploader.attachment(:data)

    validates :data, presence: true

    def url_thumb
      @url_thumb ||= Ckeditor::Utils.filethumb(filename)
    end
  end
end

Version data entries

10 entries across 7 versions & 2 rubygems

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