Use count cache instead of counting comments in calculating score

This commit is contained in:
Jose Farias
2024-11-19 13:26:25 -06:00
parent 0c38699dec
commit 2a9be42c4e
+1 -1
View File
@@ -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