Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Artur <felipefac@gmail.com>2018-02-05 18:53:49 +0300
committerFelipe Artur <felipefac@gmail.com>2018-02-05 18:53:49 +0300
commit9f40e4160075063afbb7d730682fe5c5997b3063 (patch)
treeb3b51f28787b95823d7272ef1317d07b2cbd7748 /app/controllers/projects
parent439ce0d53c70ad89d77a769fde89f2f12322b590 (diff)
Do not render notes when (un)resolving dicussions
Diffstat (limited to 'app/controllers/projects')
-rw-r--r--app/controllers/projects/discussions_controller.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/controllers/projects/discussions_controller.rb b/app/controllers/projects/discussions_controller.rb
index fa610268dec..3070a78dcfb 100644
--- a/app/controllers/projects/discussions_controller.rb
+++ b/app/controllers/projects/discussions_controller.rb
@@ -1,5 +1,4 @@
class Projects::DiscussionsController < Projects::ApplicationController
- include RendersNotes
include NotesHelper
before_action :check_merge_requests_available!
@@ -23,7 +22,6 @@ class Projects::DiscussionsController < Projects::ApplicationController
def render_discussion
if use_serializer?
- prepare_notes_for_rendering(discussion.notes)
render_json_with_serializer
else
render_json_with_html
@@ -37,7 +35,7 @@ class Projects::DiscussionsController < Projects::ApplicationController
def render_json_with_serializer
render json:
DiscussionSerializer.new(project: project, noteable: discussion.noteable, current_user: current_user).
- represent(discussion, context: self)
+ represent(discussion, context: self, skip_notes_rendering: true)
end
# Legacy method used to render discussions notes when not using Vue on views.