Add Status#only_reblogs scope for annual report classes (#35141)
This commit is contained in:
parent
16057f550d
commit
36f01af6c4
5 changed files with 15 additions and 3 deletions
|
|
@ -120,6 +120,7 @@ class Status < ApplicationRecord
|
|||
scope :with_accounts, ->(ids) { where(id: ids).includes(:account) }
|
||||
scope :without_replies, -> { not_reply.or(reply_to_account) }
|
||||
scope :not_reply, -> { where(reply: false) }
|
||||
scope :only_reblogs, -> { where.not(reblog_of_id: nil) }
|
||||
scope :reply_to_account, -> { where(arel_table[:in_reply_to_account_id].eq arel_table[:account_id]) }
|
||||
scope :without_reblogs, -> { where(statuses: { reblog_of_id: nil }) }
|
||||
scope :tagged_with, ->(tag_ids) { joins(:statuses_tags).where(statuses_tags: { tag_id: tag_ids }) }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue