about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorDavid Yip <yipdw@member.fsf.org>2018-05-04 02:38:04 -0500
committerDavid Yip <yipdw@member.fsf.org>2018-05-04 02:38:04 -0500
commit106a5d7b83e471e7011b22da25bf09396af28662 (patch)
tree50fb4ea15e8b3b90dd128b9cbf9921ae16c2d16b /app/models
parentc816701550d7cdb593371dc47d0b9430c78308b0 (diff)
Remove unnecessary code from MediaAttachment#set_type_and_extension.
Well, it seems unnecessary, anyway.
Diffstat (limited to 'app/models')
-rw-r--r--app/models/media_attachment.rb3
1 files changed, 0 insertions, 3 deletions
diff --git a/app/models/media_attachment.rb b/app/models/media_attachment.rb
index 62abc876e..c041dce51 100644
--- a/app/models/media_attachment.rb
+++ b/app/models/media_attachment.rb
@@ -200,9 +200,6 @@ class MediaAttachment < ApplicationRecord
 
   def set_type_and_extension
     self.type = VIDEO_MIME_TYPES.include?(file_content_type) ? :video : AUDIO_MIME_TYPES.include?(file_content_type) ? :audio : :image
-    extension = AUDIO_MIME_TYPES.include?(file_content_type) ? '.mp4' : appropriate_extension
-    basename  = Paperclip::Interpolations.basename(file, :original)
-    file.instance_write :file_name, [basename, extension].delete_if(&:blank?).join('.')
   end
 
   def set_meta