rubocop
This commit is contained in:
parent
3007cb78c1
commit
94e94a62a2
1 changed files with 5 additions and 5 deletions
|
@ -7,23 +7,23 @@ module Attachable
|
||||||
end
|
end
|
||||||
|
|
||||||
def images
|
def images
|
||||||
attachments.where(file_content_type: self.image_types)
|
attachments.where(file_content_type: image_types)
|
||||||
end
|
end
|
||||||
|
|
||||||
def audios
|
def audios
|
||||||
attachments.where(file_content_type: self.audio_types)
|
attachments.where(file_content_type: audio_types)
|
||||||
end
|
end
|
||||||
|
|
||||||
def texts
|
def texts
|
||||||
attachments.where(file_content_type: self.text_types)
|
attachments.where(file_content_type: text_types)
|
||||||
end
|
end
|
||||||
|
|
||||||
def pdfs
|
def pdfs
|
||||||
attachments.where(file_content_type: self.pdf_types)
|
attachments.where(file_content_type: pdf_types)
|
||||||
end
|
end
|
||||||
|
|
||||||
def documents
|
def documents
|
||||||
attachments.where(file_content_type: self.text_types + self.pdf_types)
|
attachments.where(file_content_type: text_types + pdf_types)
|
||||||
end
|
end
|
||||||
|
|
||||||
class << self
|
class << self
|
||||||
|
|
Loading…
Add table
Reference in a new issue