0
0
Fork 0

Use joins for account properties (#3167)

This commit is contained in:
Akihiko Odaki 2017-05-20 22:13:51 +09:00 committed by Eugen Rochko
parent d972845ff6
commit f554807563
6 changed files with 51 additions and 36 deletions

View file

@ -60,6 +60,6 @@ class BlockDomainService < BaseService
end
def media_from_blocked_domain
MediaAttachment.where(account: blocked_domain_accounts).reorder(nil)
MediaAttachment.joins(:account).merge(blocked_domain_accounts).reorder(nil)
end
end