Merge remote-tracking branch 'parent/stable-4.2' into kb-draft-5.14-lts

This commit is contained in:
KMY 2024-01-25 07:45:24 +09:00
commit 1d42b6b82f
59 changed files with 810 additions and 489 deletions

View file

@ -128,7 +128,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(records: grouped_notifications, associations: associations).call
end
unique_target_statuses = notifications.filter_map(&:target_status).uniq