about summary refs log tree commit diff
path: root/app/models/concerns/attachmentable.rb
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 /app/models/concerns/attachmentable.rb
parentd1290fbd8f0bbdcef7c0d7eec2b8865ddf9ae804 (diff)
Fixes unknown mime type (#2822)
Diffstat (limited to 'app/models/concerns/attachmentable.rb')
-rw-r--r--app/models/concerns/attachmentable.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/concerns/attachmentable.rb b/app/models/concerns/attachmentable.rb
index 995643ada..90ce88463 100644
--- a/app/models/concerns/attachmentable.rb
+++ b/app/models/concerns/attachmentable.rb
@@ -15,7 +15,7 @@ module Attachmentable
       next if attachment.blank?
       extension = Paperclip::Interpolations.content_type_extension(attachment, :original)
       basename  = Paperclip::Interpolations.basename(attachment, :original)
-      attachment.instance_write :file_name, [basename, extension].delete_if(&:empty?).join('.')
+      attachment.instance_write :file_name, [basename, extension].delete_if(&:blank?).join('.')
     end
   end
 end