1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-17 06:52:27 +01:00

fix social sharing of trainings

This commit is contained in:
Sylvain 2018-01-09 16:53:27 +01:00
parent 679ccfec99
commit c174f22c00

View File

@ -55,4 +55,9 @@ class TrainingImageUploader < CarrierWave::Uploader::Base
def filename
"training_image.#{file.extension}" if original_filename
end
# return an array like [width, height]
def dimensions
::MiniMagick::Image.open(file.file)[:dimensions]
end
end