X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/945df0f150ea803e1a654b03155ecdb444c6ed1c..126a987aa8b2d95b90b0970fba7d4e6df1cfaac0:/app/models/note_comment.rb?ds=sidebyside

diff --git a/app/models/note_comment.rb b/app/models/note_comment.rb
index b870e5558..d318c5e95 100644
--- a/app/models/note_comment.rb
+++ b/app/models/note_comment.rb
@@ -26,7 +26,7 @@
 
 class NoteComment < ApplicationRecord
   belongs_to :note, :touch => true
-  belongs_to :author, :class_name => "User", :optional => true
+  belongs_to :author, :class_name => "User", :optional => true, :counter_cache => true
 
   validates :id, :uniqueness => true, :presence => { :on => :update },
                  :numericality => { :on => :update, :only_integer => true }