0
0
Fork 0

Reports spec for media attachments, clean up method (#2660)

* Add coverage for Report#media_attachments

* Direct query on media attachment
This commit is contained in:
Matt Jankowski 2017-04-30 12:15:49 -04:00 committed by Eugen Rochko
parent b83bc0ae64
commit 5259319cf5
2 changed files with 12 additions and 5 deletions

View file

@ -13,10 +13,6 @@ class Report < ApplicationRecord
end
def media_attachments
media_attachments = []
statuses.each do |s|
media_attachments.concat s.media_attachments
end
media_attachments
MediaAttachment.where(status_id: status_ids)
end
end