0
0
Fork 0
mirror of https://github.com/ENSL/ensl.org.git synced 2025-01-19 16:01:26 +00:00
ensl.org/app/uploaders/image_uploader.rb
2014-03-24 14:23:08 +00:00

19 lines
304 B
Ruby

# encoding: utf-8
class ImageUploader < CarrierWave::Uploader::Base
include CarrierWave::RMagick
storage :file
def store_dir
"images"
end
def filename
model.id.to_s + File.extname(@filename) unless @filename.nil?
end
def extension_white_list
%w(jpg jpeg gif png)
end
end