Sha256: cb25904bcd42641b9282a3d8d6baed62919bdd1018e4d375c01d12d01163cf27

Contents?: true

Size: 423 Bytes

Versions: 12

Compression:

Stored size: 423 Bytes

Contents

module Adminpanel
  class RandomPagefileUploader < CarrierWave::Uploader::Base
    include CarrierWave::MiniMagick

    storage :file

    def root
      Rails.root.join 'public/'
    end

    def store_dir
      "uploads/image/#{model.class.name.demodulize}/#{model.id}"
    end

    version :thumb do
      process resize_to_fill: [120, 120]
    end

    def extension_white_list
      %w(jpg jpeg png)
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
adminpanel-3.6.1 test/dummy/app/uploader/adminpanel/random_pagefile_uploader.rb
adminpanel-3.6.0 test/dummy/app/uploader/adminpanel/random_pagefile_uploader.rb
adminpanel-3.5.1 test/dummy/app/uploader/adminpanel/random_pagefile_uploader.rb
adminpanel-3.5.0 test/dummy/app/uploader/adminpanel/random_pagefile_uploader.rb
adminpanel-3.4.7 test/dummy/app/uploader/adminpanel/random_pagefile_uploader.rb
adminpanel-3.4.6 test/dummy/app/uploader/adminpanel/random_pagefile_uploader.rb
adminpanel-3.4.5 test/dummy/app/uploader/adminpanel/random_pagefile_uploader.rb
adminpanel-3.4.4 test/dummy/app/uploader/adminpanel/random_pagefile_uploader.rb
adminpanel-3.4.3 test/dummy/app/uploader/adminpanel/random_pagefile_uploader.rb
adminpanel-3.4.2 test/dummy/app/uploader/adminpanel/random_pagefile_uploader.rb
adminpanel-3.4.1 test/dummy/app/uploader/adminpanel/random_pagefile_uploader.rb
adminpanel-3.4.0 test/dummy/app/uploader/adminpanel/random_pagefile_uploader.rb