Commit 6a0124b9 by Jon Yurek

Merge pull request #968 from scambra/patch-1

Fix syntax error on ruby 1.8.7
parents 5d06ad8c c57255ab
...@@ -149,7 +149,7 @@ module Paperclip ...@@ -149,7 +149,7 @@ module Paperclip
# scale to the requested geometry and preserve the aspect ratio # scale to the requested geometry and preserve the aspect ratio
def scale_to(new_geometry) def scale_to(new_geometry)
scale = [new_geometry.width.to_f / self.width.to_f , new_geometry.height.to_f / self.height.to_f].min scale = [new_geometry.width.to_f / self.width.to_f , new_geometry.height.to_f / self.height.to_f].min
Paperclip::Geometry.new (self.width * scale).round, (self.height * scale).round Paperclip::Geometry.new((self.width * scale).round, (self.height * scale).round)
end end
end end
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment