Browse Source

Remove unnecessary code from MediaAttachment#set_type_and_extension.

Well, it seems unnecessary, anyway.
closed-social-glitch-2
David Yip 6 years ago
parent
commit
106a5d7b83
No known key found for this signature in database GPG Key ID: 7DA0036508FCC0CC
1 changed files with 0 additions and 3 deletions
  1. +0
    -3
      app/models/media_attachment.rb

+ 0
- 3
app/models/media_attachment.rb View File

@ -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

Loading…
Cancel
Save