lib/cloudinary/carrier_wave/process.rb in cloudinary-1.0.39 vs lib/cloudinary/carrier_wave/process.rb in cloudinary-1.0.40

- old
+ new

@@ -129,17 +129,18 @@ def format format_processor = self.all_processors.find{|processor| processor[0] == :convert} if format_processor # Explicit format is given - return Array(format_processor[1]).first + format = Array(format_processor[1]).first elsif self.version_name.present? # No local format. The reset should be handled by main uploader uploader = self.model.send(self.mounted_as) - return uploader.format + format = uploader.format else # Try to auto-detect format format = Cloudinary::CarrierWave.split_format(original_filename || "").last - return format || "png" # TODO Default format? + format ||= "png" # TODO Default format? end + format.to_s.downcase end end