From b14b5e3b448eafa1489d6fe4b702621e25dff1ae Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 3 Dec 2016 20:04:19 +0100 Subject: Improve notification model --- app/models/status.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/models/status.rb') diff --git a/app/models/status.rb b/app/models/status.rb index f6d8fc9bb..1f5cf9b46 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -94,11 +94,11 @@ class Status < ApplicationRecord class << self def as_home_timeline(account) - where(account: [account] + account.following).with_includes + where(account: [account] + account.following) end def as_mentions_timeline(account) - where(id: Mention.where(account: account).pluck(:status_id)).with_includes + where(id: Mention.where(account: account).select(:status_id)) end def as_public_timeline(account = nil) -- cgit