Rails 7 update (#24241)

This commit is contained in:
Matt Jankowski
2023-07-02 04:38:53 -04:00
committed by GitHub
parent 4fe2d7cb59
commit 50c2a03695
22 changed files with 242 additions and 144 deletions
+2 -2
View File
@@ -122,7 +122,7 @@ module AccountSearch
tsquery = generate_query_for_search(terms)
find_by_sql([BASIC_SEARCH_SQL, { limit: limit, offset: offset, tsquery: tsquery }]).tap do |records|
ActiveRecord::Associations::Preloader.new.preload(records, :account_stat)
ActiveRecord::Associations::Preloader.new(records: records, associations: :account_stat)
end
end
@@ -131,7 +131,7 @@ module AccountSearch
sql_template = following ? ADVANCED_SEARCH_WITH_FOLLOWING : ADVANCED_SEARCH_WITHOUT_FOLLOWING
find_by_sql([sql_template, { id: account.id, limit: limit, offset: offset, tsquery: tsquery }]).tap do |records|
ActiveRecord::Associations::Preloader.new.preload(records, :account_stat)
ActiveRecord::Associations::Preloader.new(records: records, associations: :account_stat)
end
end