Sha256: 6df0883e54acb69826a4c16d6a931013de6a3acad28d2a4882f14e4c1d4f75aa

Contents?: true

Size: 377 Bytes

Versions: 13

Compression:

Stored size: 377 Bytes

Contents

module ThecoreSettings
  module Uploads
    class ShrineUploader < Shrine
        plugin :determine_mime_type
        plugin :validation_helpers
        plugin :mongoid if ThecoreSettings.mongoid?
        Attacher.validate do
          validate_mime_type_inclusion %w[image/jpeg image/gif image/png]
          validate_max_size 2.megabytes
        end
      end

    end
  end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
thecore_settings-2.0.9 lib/thecore_settings/storage/shrine_uploader.rb
thecore_settings-3.0.6 lib/thecore_settings/storage/shrine_uploader.rb
thecore_settings-3.0.5 lib/thecore_settings/storage/shrine_uploader.rb
thecore_settings-3.0.4 lib/thecore_settings/storage/shrine_uploader.rb
thecore_settings-3.0.3 lib/thecore_settings/storage/shrine_uploader.rb
thecore_settings-3.0.0 lib/thecore_settings/storage/shrine_uploader.rb
thecore_settings-2.0.8 lib/thecore_settings/storage/shrine_uploader.rb
thecore_settings-2.0.7 lib/thecore_settings/storage/shrine_uploader.rb
thecore_settings-2.0.6 lib/thecore_settings/storage/shrine_uploader.rb
thecore_settings-2.0.5 lib/thecore_settings/storage/shrine_uploader.rb
thecore_settings-2.0.4 lib/thecore_settings/storage/shrine_uploader.rb
thecore_settings-2.0.3 lib/thecore_settings/storage/shrine_uploader.rb
thecore_settings-2.0.2 lib/thecore_settings/storage/shrine_uploader.rb