class AvatarUploader < CarrierWave::Uploader::Base
  include CarrierWave::MiniMagick

  process :resize_to_fit => [1280, 1024]

  version :thumb_small do
    process resize_to_fill: [320,200]
  end

  version :thumb do
    process resize_to_fill: [70,64]
  end
  
  storage :file

  def extension_whitelist
    %w(jpg jpeg png)
  end
  
  def store_dir
    "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
  end

end
