about summary refs log tree commit diff
path: root/config
diff options
context:
space:
mode:
authoralpaca-tc <alpaca-tc@alpaca.tc>2017-05-06 04:32:14 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-05-05 21:32:14 +0200
commitee3e0a93f43d7236928dc2dd63361b69cd7883ee (patch)
tree64faeff31682318099add4bb7643ef752b769e22 /config
parentd1290fbd8f0bbdcef7c0d7eec2b8865ddf9ae804 (diff)
Fixes unknown mime type (#2822)
Diffstat (limited to 'config')
-rw-r--r--config/initializers/paperclip.rb2
1 files changed, 1 insertions, 1 deletions
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'