summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2016-06-26 10:09:42 -0400
committerDouwe Maan <douwe@gitlab.com>2016-06-27 18:00:18 +0000
commitc2223efe840e344da8d6e1347bd028899bb6117a (patch)
tree0c304d794ff4da61bcecddcb3baac9e1c0648692
parentc3a8b252cdf569729e5e1e8e0614b4d2e5226371 (diff)
downloadgitlab-ce-c2223efe840e344da8d6e1347bd028899bb6117a.tar.gz
Fix rendering of commit notes
-rw-r--r--app/controllers/projects/commit_controller.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/app/controllers/projects/commit_controller.rb b/app/controllers/projects/commit_controller.rb
index 6751737d15e..d162a5a3165 100644
--- a/app/controllers/projects/commit_controller.rb
+++ b/app/controllers/projects/commit_controller.rb
@@ -18,9 +18,16 @@ class Projects::CommitController < Projects::ApplicationController
apply_diff_view_cookie!
@grouped_diff_notes = commit.notes.grouped_diff_notes
+ @notes = commit.notes.non_diff_notes.fresh
+
+ Banzai::NoteRenderer.render(
+ @grouped_diff_notes.values.flatten + @notes,
+ @project,
+ current_user,
+ )
@note = @project.build_commit_note(commit)
- @notes = commit.notes.non_diff_notes.fresh
+
@noteable = @commit
@comments_target = {
noteable_type: 'Commit',