mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-25 12:34:58 +01:00
Fix follow recommendations for less used languages (#29017)
This commit is contained in:
parent
0c0d077276
commit
c4af668e5c
@ -15,7 +15,7 @@ class AccountSummary < ApplicationRecord
|
|||||||
has_many :follow_recommendation_suppressions, primary_key: :account_id, foreign_key: :account_id, inverse_of: false
|
has_many :follow_recommendation_suppressions, primary_key: :account_id, foreign_key: :account_id, inverse_of: false
|
||||||
|
|
||||||
scope :safe, -> { where(sensitive: false) }
|
scope :safe, -> { where(sensitive: false) }
|
||||||
scope :localized, ->(locale) { where(language: locale) }
|
scope :localized, ->(locale) { order(Arel::Nodes::Case.new.when(arel_table[:language].eq(locale)).then(1).else(0).desc) }
|
||||||
scope :filtered, -> { where.missing(:follow_recommendation_suppressions) }
|
scope :filtered, -> { where.missing(:follow_recommendation_suppressions) }
|
||||||
|
|
||||||
def self.refresh
|
def self.refresh
|
||||||
|
Loading…
Reference in New Issue
Block a user