Class: Locomotive::PictureUploader
Instance Method Summary
collapse
#build_store_dir, #to_label, #to_liquid
#download!
Instance Method Details
#extension_whitelist ⇒ Object
6
7
8
|
# File 'app/uploaders/locomotive/picture_uploader.rb', line 6
def extension_whitelist
%w(jpg jpeg gif png tiff)
end
|
10
11
12
|
# File 'app/uploaders/locomotive/picture_uploader.rb', line 10
def image?
self.file.try(:exists?)
end
|
#store_dir ⇒ Object
14
15
16
|
# File 'app/uploaders/locomotive/picture_uploader.rb', line 14
def store_dir
self.build_store_dir('uploaded_assets', model.id)
end
|