module Paperclip class Rotator < Thumbnail def transformation_command rotate = @attachment.instance.rotating? ? @attachment.instance.rotation_degrees : false if rotate super << "-rotate #{rotate}" else super end end end end