Move AccountSuggestions::Source subclasses default limit value to constant (#29282)
This commit is contained in:
parent
e1cee84e58
commit
0ef44ee720
5 changed files with 6 additions and 4 deletions
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AccountSuggestions::FriendsOfFriendsSource < AccountSuggestions::Source
|
||||
def get(account, limit: 10)
|
||||
def get(account, limit: DEFAULT_LIMIT)
|
||||
Account.find_by_sql([<<~SQL.squish, { id: account.id, limit: limit }]).map { |row| [row.id, key] }
|
||||
WITH first_degree AS (
|
||||
SELECT target_account_id
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue