Sha256: 2deedb437542fe562a174ce87dfb8791c4b5779f9dfec931d470bbba23e5e922

Contents?: true

Size: 344 Bytes

Versions: 9

Compression:

Stored size: 344 Bytes

Contents

require 'carrierwave/processing/mini_magick'

module Thredded
  class ImageUploader < CarrierWave::Uploader::Base
    include CarrierWave::MiniMagick

    storage :file

    def store_dir
      "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
    end

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

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
thredded-0.0.10 app/uploaders/thredded/image_uploader.rb
thredded-0.0.9 app/uploaders/thredded/image_uploader.rb
thredded-0.0.8 app/uploaders/thredded/image_uploader.rb
thredded-0.0.7 app/uploaders/thredded/image_uploader.rb
thredded-0.0.6 app/uploaders/thredded/image_uploader.rb
thredded-0.0.5 app/uploaders/thredded/image_uploader.rb
thredded-0.0.4 app/uploaders/thredded/image_uploader.rb
thredded-0.0.3 app/uploaders/thredded/image_uploader.rb
thredded-0.0.1 app/uploaders/thredded/image_uploader.rb