From ee3e0a93f43d7236928dc2dd63361b69cd7883ee Mon Sep 17 00:00:00 2001 From: alpaca-tc Date: Sat, 6 May 2017 04:32:14 +0900 Subject: Fixes unknown mime type (#2822) --- config/initializers/paperclip.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/initializers/paperclip.rb b/config/initializers/paperclip.rb index d0dd613d0..740c1a953 100644 --- a/config/initializers/paperclip.rb +++ b/config/initializers/paperclip.rb @@ -4,7 +4,7 @@ Paperclip.options[:read_timeout] = 60 Paperclip.interpolates :filename do |attachment, style| return attachment.original_filename if style == :original - [basename(attachment, style), extension(attachment, style)].delete_if(&:empty?).join('.') + [basename(attachment, style), extension(attachment, style)].delete_if(&:blank?).join('.') end if ENV['S3_ENABLED'] == 'true' -- cgit