From 2d7f4acbbe037b7b97197342f78283a67f06d11e Mon Sep 17 00:00:00 2001 From: Molly Struve Date: Tue, 28 Apr 2020 13:35:18 -0500 Subject: [PATCH] [deploy] Only Calculate Comment Score on Update and Create (#7574) --- app/models/comment.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/comment.rb b/app/models/comment.rb index 8af13ad8e..f30834f3c 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -31,7 +31,7 @@ class Comment < ApplicationRecord after_create :notify_slack_channel_about_warned_users after_create :after_create_checks after_create_commit :record_field_test_event - after_commit :calculate_score + after_commit :calculate_score, on: %i[create update] after_update_commit :update_notifications, if: proc { |comment| comment.saved_changes.include? "body_markdown" } after_save :bust_cache after_save :synchronous_bust