Browse files

fix stupid typo where we generate height x height instead of width x …

…height
  • Loading branch information...
1 parent d1adacb commit 52c6e8d4b08bd9318a582fc2fbcab47640a82be5 Jeff Sutherland committed Nov 25, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/attachment_on_the_fly.rb
View
4 lib/attachment_on_the_fly.rb
@@ -1,5 +1,5 @@
#
-# Methods to allow attachment modification on-the-fly ... a replacement for PhotoActiveRecord that integrates with Paperclip
+# Methods to allow attachment modification on-the-fly
# the paperclip attachment attribute should be called "attachment" on the model
#
Paperclip::Attachment.class_eval do
@@ -86,7 +86,7 @@ def generate_image(kind, height = 0, width = 0)
`convert -colorspace RGB -geometry #{width} -quality 100 -sharpen 1 #{original} #{newfilename} 2>&1 > /dev/null`
elsif kind == "both"
# resize_image infilename, outfilename, height, width
- `convert -colorspace RGB -geometry #{height}x#{height} -quality 100 -sharpen 1 #{original} #{newfilename} 2>&1 > /dev/null`
+ `convert -colorspace RGB -geometry #{width}x#{height} -quality 100 -sharpen 1 #{original} #{newfilename} 2>&1 > /dev/null`
end
return new_path

0 comments on commit 52c6e8d

Please sign in to comment.