Merge remote-tracking branch 'parent/main' into upstream-20240422
This commit is contained in:
commit
44f4a93430
100 changed files with 770 additions and 441 deletions
|
@ -55,6 +55,8 @@ class Tag < ApplicationRecord
|
|||
scope :listable, -> { where(listable: [true, nil]) }
|
||||
scope :trendable, -> { Setting.trendable_by_default ? where(trendable: [true, nil]) : where(trendable: true) }
|
||||
scope :not_trendable, -> { where(trendable: false) }
|
||||
scope :suggestions_for_account, ->(account) { recently_used(account).not_featured_by(account) }
|
||||
scope :not_featured_by, ->(account) { where.not(id: account.featured_tags.select(:tag_id)) }
|
||||
scope :recently_used, lambda { |account|
|
||||
joins(:statuses)
|
||||
.where(statuses: { id: account.statuses.select(:id).limit(RECENT_STATUS_LIMIT) })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue