Use hash arguments to select
when possible (Rails 7.2) (#32917)
This commit is contained in:
parent
3e44dca0b4
commit
477412d62a
4 changed files with 10 additions and 10 deletions
|
@ -162,7 +162,7 @@ class FeedManager
|
|||
timeline_key = key(:home, into_account.id)
|
||||
timeline_status_ids = redis.zrange(timeline_key, 0, -1)
|
||||
|
||||
from_account.statuses.select('id, reblog_of_id').where(id: timeline_status_ids).reorder(nil).find_each do |status|
|
||||
from_account.statuses.select(:id, :reblog_of_id).where(id: timeline_status_ids).reorder(nil).find_each do |status|
|
||||
remove_from_feed(:home, into_account.id, status, aggregate_reblogs: into_account.user&.aggregates_reblogs?)
|
||||
end
|
||||
end
|
||||
|
@ -175,7 +175,7 @@ class FeedManager
|
|||
timeline_key = key(:list, list.id)
|
||||
timeline_status_ids = redis.zrange(timeline_key, 0, -1)
|
||||
|
||||
from_account.statuses.select('id, reblog_of_id').where(id: timeline_status_ids).reorder(nil).find_each do |status|
|
||||
from_account.statuses.select(:id, :reblog_of_id).where(id: timeline_status_ids).reorder(nil).find_each do |status|
|
||||
remove_from_feed(:list, list.id, status, aggregate_reblogs: list.account.user&.aggregates_reblogs?)
|
||||
end
|
||||
end
|
||||
|
@ -196,7 +196,7 @@ class FeedManager
|
|||
.where.not(account: into_account.following)
|
||||
.tagged_with_none(TagFollow.where(account: into_account).pluck(:tag_id))
|
||||
|
||||
scope.select('id, reblog_of_id').reorder(nil).find_each do |status|
|
||||
scope.select(:id, :reblog_of_id).reorder(nil).find_each do |status|
|
||||
remove_from_feed(:home, into_account.id, status, aggregate_reblogs: into_account.user&.aggregates_reblogs?)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue