Move AccountSuggestions::Source subclasses default limit value to constant (#29282)

This commit is contained in:
Matt Jankowski 2024-02-20 04:21:49 -05:00 committed by GitHub
parent e1cee84e58
commit 0ef44ee720
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 6 additions and 4 deletions

View file

@ -47,7 +47,7 @@ class AccountSuggestions::SimilarProfilesSource < AccountSuggestions::Source
end
end
def get(account, limit: 10)
def get(account, limit: DEFAULT_LIMIT)
recently_followed_account_ids = account.active_relationships.recent.limit(5).pluck(:target_account_id)
if Chewy.enabled? && !recently_followed_account_ids.empty?