0
0
Fork 0

Revert "Rails 7 update" (#25667)

This commit is contained in:
Eugen Rochko 2023-07-02 11:14:22 +02:00 committed by GitHub
parent 5b46345459
commit ba06a2f104
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 144 additions and 242 deletions

View file

@ -111,7 +111,7 @@ class Notification < ApplicationRecord
# Instead of using the usual `includes`, manually preload each type.
# If polymorphic associations are loaded with the usual `includes`, other types of associations will be loaded more.
ActiveRecord::Associations::Preloader.new(records: grouped_notifications, associations: associations)
ActiveRecord::Associations::Preloader.new.preload(grouped_notifications, associations)
end
unique_target_statuses = notifications.filter_map(&:target_status).uniq