Sha256: 87e4ba57562a7c6d0c09d27f015a6036b7a437c84863f927cfe89b3ab6d837b5

Contents?: true

Size: 696 Bytes

Versions: 4

Compression:

Stored size: 696 Bytes

Contents

# encoding: utf-8

module PowerShop
  class ShopImageUploader < CarrierWave::Uploader::Base

    include CarrierWave::RMagick

    # Choose what kind of storage to use for this uploader:
    storage :file
    # storage :fog

    # Override the directory where uploaded files will be stored.
    # This is a sensible default for uploaders that are meant to be mounted:
    def store_dir
      "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
    end

    version :admin_thumb do
      process :resize_to_limit => [100, 100]
    end

    version :thumb do
      process :resize_to_limit => [100, 100]
    end

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
power_shop-0.2.2 app/uploaders/power_shop/shop_image_uploader.rb
power_shop-0.2.1 app/uploaders/power_shop/shop_image_uploader.rb
power_shop-0.2.0 app/uploaders/power_shop/shop_image_uploader.rb
power_shop-0.1.1 app/uploaders/power_shop/shop_image_uploader.rb