Created
October 11, 2013 04:40
-
-
Save ppworks/6929685 to your computer and use it in GitHub Desktop.
carriewaveでExifの回転情報をいい感じにする ref: http://qiita.com/ppworks/items/ae479c036d25b3e7b120
This file contains hidden or 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 ImageUploader < CarrierWave::Uploader::Base | |
include CarrierWave::MiniMagick | |
process :fix_rotate | |
def fix_rotate | |
manipulate! do |img| | |
img.auto_orient | |
yield(img) if block_given? | |
img | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment