cleaned up CookedPostProcessor and improved specs

This commit is contained in:
Régis Hanol
2013-06-15 12:29:20 +02:00
parent 8a98310cf9
commit c11f4456ae
6 changed files with 113 additions and 126 deletions

View File

@ -3,7 +3,7 @@ module ImageSizer
# Resize an image to the aspect ratio we want
def self.resize(width, height)
max_width = SiteSetting.max_image_width.to_f
return nil if width.blank? || height.blank?
return if width.blank? || height.blank?
w = width.to_f
h = height.to_f