mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 05:41:15 +08:00
cleaned up CookedPostProcessor and improved specs
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user