From 2a9be42c4e7dafb0f1a8de1e34c6e16b30cc447a Mon Sep 17 00:00:00 2001 From: Jose Farias Date: Tue, 19 Nov 2024 13:26:25 -0600 Subject: [PATCH] Use count cache instead of counting comments in calculating score --- app/models/bubble.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/bubble.rb b/app/models/bubble.rb index 905f1c5ce..7364a0841 100644 --- a/app/models/bubble.rb +++ b/app/models/bubble.rb @@ -25,7 +25,7 @@ class Bubble < ApplicationRecord end def rescore - update! activity_score: boost_count + messages.comments.size + update! activity_score: boost_count + comments_count end private