Class: C80Contest::ButtonPhotoUploader

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

Instance Method Summary collapse

Instance Method Details

#filenameObject



18
19
20
21
22
# File 'app/uploaders/c80_contest/button_photo_uploader.rb', line 18

def filename
  if original_filename
    "button_#{secure_token(4)}.#{file.extension}"
  end
end

#store_dirObject



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

def store_dir
  'uploads/buttons/'
end