Skip to content

Instantly share code, notes, and snippets.

@pierrevalade
Forked from phorsfall/gist:66415
Created May 25, 2009 11:17
Show Gist options
  • Save pierrevalade/117499 to your computer and use it in GitHub Desktop.
Save pierrevalade/117499 to your computer and use it in GitHub Desktop.
module Paperclip
class ThumbnailWithDimensions < Thumbnail
def initialize(file, options = {}, attachment = nil)
super
attachment.instance_write(:width, @current_geometry.width)
attachment.instance_write(: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