From fb287f326eb6d4e759f56ec1f008c957466b0331 Mon Sep 17 00:00:00 2001 From: Mitsuhiro Shibuya Date: Sat, 7 Dec 2024 13:24:21 +0900 Subject: [PATCH] Show warning when conditionals are used with :convert Refs. #2723 --- lib/carrierwave/uploader/processing.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/carrierwave/uploader/processing.rb b/lib/carrierwave/uploader/processing.rb index 1b638abdb..41bbfbd9d 100644 --- a/lib/carrierwave/uploader/processing.rb +++ b/lib/carrierwave/uploader/processing.rb @@ -70,6 +70,9 @@ def process(*args) if processor == :convert # Treat :convert specially, since it should trigger the file extension change force_extension processor_args + if condition + warn "Use of 'process convert: format' with conditionals has an issue and doesn't work correctly. See https://github.com/carrierwaveuploader/carrierwave/issues/2723 for details. " + end end end end