Created
June 13, 2015 13:57
-
-
Save alfakini/8d97b94a37cbb0f855cd to your computer and use it in GitHub Desktop.
Test Syntax
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AccountLogoUploader < CarrierWave::Uploader::Base | |
include CarrierWave::MiniMagick | |
max_file_size = 5.megabytes | |
version :original do | |
process | |
end | |
private | |
def is_retina_resolution?(new_file) | |
image = MiniMagick::Image.open(self.file.file) | |
true if image[:height] >= 160*2 and image[:width] >= 160*2 | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment