Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kylebragger/667288 to your computer and use it in GitHub Desktop.
Save kylebragger/667288 to your computer and use it in GitHub Desktop.
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?
" -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