diff options
author | Yamagishi Kazutoshi <ykzts@desire.sh> | 2019-12-03 02:25:43 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2019-12-02 18:25:43 +0100 |
commit | 6be16d02cb3f03d21226f9b6664d33e3e8650043 (patch) | |
tree | 078570307ddd9fa3386484f1e25bb043babbf805 /lib/paperclip | |
parent | 27d5d02925252314e4ec81bca8f72c5f91a55b7f (diff) |
Update ESLint and RuboCop in Code Climate (#12534)
Diffstat (limited to 'lib/paperclip')
-rw-r--r-- | lib/paperclip/lazy_thumbnail.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/paperclip/lazy_thumbnail.rb b/lib/paperclip/lazy_thumbnail.rb index 542c17fb2..10b14860c 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 |