summaryrefslogtreecommitdiff
path: root/app/models/note.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/note.rb')
-rw-r--r--app/models/note.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/note.rb b/app/models/note.rb
index d1a59394ba1..ed341e58436 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -500,6 +500,13 @@ class Note < ApplicationRecord
refs
end
+ def bump_updated_at
+ # Instead of calling touch which is throttled via ThrottledTouch concern,
+ # we bump the updated_at column directly. This also prevents executing
+ # after_commit callbacks that we don't need.
+ update_column(:updated_at, Time.current)
+ end
+
def expire_etag_cache
noteable&.expire_note_etag_cache
end