about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorYamagishi Kazutoshi <ykzts@desire.sh>2019-12-03 02:25:43 +0900
committermultiple creatures <dev@multiple-creature.party>2020-02-21 04:03:46 -0600
commit28073bbcd6010de077e528f0447b35e51905ed23 (patch)
treed4751866764c114f4a3030aae835922c6b8a0570 /lib
parent924c2c0880a96d8e502427e0b697148916c021f1 (diff)
port tootsuite#12534 to monsterfork: Update ESLint and RuboCop in Code Climate
Diffstat (limited to 'lib')
-rw-r--r--lib/paperclip/lazy_thumbnail.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/paperclip/lazy_thumbnail.rb b/lib/paperclip/lazy_thumbnail.rb
index 5992e76d8..597d7f0bc 100644
--- a/lib/paperclip/lazy_thumbnail.rb
+++ b/lib/paperclip/lazy_thumbnail.rb
@@ -9,8 +9,8 @@ module Paperclip
         min_side = [@current_geometry.width, @current_geometry.height].min.to_i
         options[:geometry] = "#{min_side}x#{min_side}#" if @target_geometry.square? && min_side < @target_geometry.width
       elsif options[:pixels]
-        width  = Math.sqrt(options[:pixels] * (@current_geometry.width.to_f / @current_geometry.height.to_f)).round.to_i
-        height = Math.sqrt(options[:pixels] * (@current_geometry.height.to_f / @current_geometry.width.to_f)).round.to_i
+        width  = Math.sqrt(options[:pixels] * (@current_geometry.width.to_f / @current_geometry.height)).round.to_i
+        height = Math.sqrt(options[:pixels] * (@current_geometry.height.to_f / @current_geometry.width)).round.to_i
         options[:geometry] = "#{width}x#{height}>"
       end