Skip to content

Instantly share code, notes, and snippets.

@bhushangahire
Created September 18, 2012 13:13
Show Gist options
  • Save bhushangahire/3743027 to your computer and use it in GitHub Desktop.
Save bhushangahire/3743027 to your computer and use it in GitHub Desktop.
Updated to work with Rails 3 and latest version of Paperclip (2.3.8)
module Paperclip
class Rotator < Thumbnail
def transformation_command
if rotate_command
super + rotate_command
else
super
end
end
def rotate_command
target = @attachment.instance
if target.rotating?
[convert_options = "-rotate #{target.rotation}"]
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment