Cache hashtag sample accounts, and exclude ineligible ones (#9465)
This commit is contained in:
parent
4638b16822
commit
6b78e5b5ab
3 changed files with 8 additions and 3 deletions
|
@ -94,7 +94,7 @@ class Account < ApplicationRecord
|
|||
scope :discoverable, -> { where(silenced: false).where(discoverable: true).joins(:account_stat).where(AccountStat.arel_table[:followers_count].gteq(MIN_FOLLOWERS_DISCOVERY)) }
|
||||
scope :tagged_with, ->(tag) { joins(:accounts_tags).where(accounts_tags: { tag_id: tag }) }
|
||||
scope :popular, -> { order('account_stats.followers_count desc') }
|
||||
scope :by_recent_status, -> { order('(case when account_stats.last_status_at is null then 1 else 0 end) asc, account_stats.last_status_at desc') }
|
||||
scope :by_recent_status, -> { order(Arel.sql('(case when account_stats.last_status_at is null then 1 else 0 end) asc, account_stats.last_status_at desc')) }
|
||||
|
||||
delegate :email,
|
||||
:unconfirmed_email,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue