Class: ProcessedImage

Inherits:
CarrierWave::Uploader::Base
  • Object
show all
Includes:
CarrierWave::MiniMagick
Defined in:
app/uploaders/processed_image.rb

Overview

Copyright © 2010-2011, Diaspora Inc. This file is

licensed under the Affero General Public License version 3 or later.  See
the COPYRIGHT file.

Instance Method Summary collapse

Instance Method Details

#extension_whitelistObject


14
15
16
# File 'app/uploaders/processed_image.rb', line 14

def extension_whitelist
  %w[jpg jpeg png gif]
end

#filenameObject


18
19
20
# File 'app/uploaders/processed_image.rb', line 18

def filename
  model.random_string + File.extname(@filename) if @filename
end

#store_dirObject


10
11
12
# File 'app/uploaders/processed_image.rb', line 10

def store_dir
  "uploads/images"
end