summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2017-12-12 21:34:21 +0100
committerYorick Peterse <yorickpeterse@gmail.com>2017-12-12 21:34:21 +0100
commitd79e82c9dde90e120bd6cf1584c3f20079c0c756 (patch)
treee39ffaf1170783b2f86afd934bedcffdb8ac109c
parent8d691856aed9c99b0728925a5c3815cc76f545b8 (diff)
downloadgitlab-ce-noteable-touch-return-object.tar.gz
Return the noteable in Note#touch_noteablenoteable-touch-return-object
This allows EE to re-use the object, making it easier to trigger indexing of the noteable.
-rw-r--r--app/models/note.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/note.rb b/app/models/note.rb
index c4c2ab8e67d..02f9fd61e49 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -401,6 +401,9 @@ class Note < ActiveRecord::Base
end
noteable_object&.touch
+
+ # We return the noteable object so we can re-use it in EE for ElasticSearch.
+ noteable_object
end
def banzai_render_context(field)