Skip to content

Instantly share code, notes, and snippets.

@phorsfall
Created February 18, 2009 17:03
Show Gist options
  • Save phorsfall/66415 to your computer and use it in GitHub Desktop.
Save phorsfall/66415 to your computer and use it in GitHub Desktop.
module Paperclip
class ThumbnailWithDimensions < Thumbnail
def initialize(file, options = {}, attachment = nil)
super
attachment.instance.width = @current_geometry.width
attachment.instance.height = @current_geometry.height
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment