markdown is also plaintext

This commit is contained in:
Devin Howard 2017-01-23 13:42:13 -05:00
parent 0b110cf469
commit 3007cb78c1
2 changed files with 5 additions and 5 deletions

View file

@ -17,19 +17,19 @@ class Attachment < ApplicationRecord
validates_attachment_content_type :file, content_type: Attachable.allowed_types validates_attachment_content_type :file, content_type: Attachable.allowed_types
def image? def image?
Attachable.image_types.include(file.instance.file_content_type) Attachable.image_types.include?(file.instance.file_content_type)
end end
def audio? def audio?
Attachable.audio_types.include(file.instance.file_content_type) Attachable.audio_types.include?(file.instance.file_content_type)
end end
def text? def text?
Attachable.text_types.include(file.instance.file_content_type) Attachable.text_types.include?(file.instance.file_content_type)
end end
def pdf? def pdf?
Attachable.pdf_types.include(file.instance.file_content_type) Attachable.pdf_types.include?(file.instance.file_content_type)
end end
def document? def document?

View file

@ -36,7 +36,7 @@ module Attachable
end end
def text_types def text_types
['text/plain', 'text/markdown'] ['text/plain']
end end
def pdf_types def pdf_types