2
0

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
5 changed files with 6 additions and 4 deletions

View File

@@ -1,7 +1,7 @@
# frozen_string_literal: true
class AccountSuggestions::SettingSource < AccountSuggestions::Source
def get(account, limit: 10)
def get(account, limit: DEFAULT_LIMIT)
if setting_enabled?
base_account_scope(account).where(setting_to_where_condition).limit(limit).pluck(:id).zip([key].cycle)
else