summaryrefslogtreecommitdiff
path: root/app/controllers/snippets_controller.rb
diff options
context:
space:
mode:
authorJarka Kadlecova <jarka@gitlab.com>2017-04-27 12:41:26 +0200
committerJarka Kadlecova <jarka@gitlab.com>2017-05-02 13:07:53 +0200
commit8c3a03c1b9bf5c80571c9dc07ba258fa10dd61c8 (patch)
treea83db3e692f01ad711f1693c739f43f6cca400ca /app/controllers/snippets_controller.rb
parent8100f9686dcd729f42d14e86cb9b36b403e036ac (diff)
downloadgitlab-ce-8c3a03c1b9bf5c80571c9dc07ba258fa10dd61c8.tar.gz
Display comments for personal snippets12910-personal-snippets-notes-show
Diffstat (limited to 'app/controllers/snippets_controller.rb')
-rw-r--r--app/controllers/snippets_controller.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/controllers/snippets_controller.rb b/app/controllers/snippets_controller.rb
index 906833505d1..e338db8353b 100644
--- a/app/controllers/snippets_controller.rb
+++ b/app/controllers/snippets_controller.rb
@@ -1,4 +1,5 @@
class SnippetsController < ApplicationController
+ include RendersNotes
include ToggleAwardEmoji
include SpammableActions
include SnippetsActions
@@ -64,6 +65,11 @@ class SnippetsController < ApplicationController
blob = @snippet.blob
override_max_blob_size(blob)
+ @noteable = @snippet
+
+ @discussions = @snippet.discussions
+ @notes = prepare_notes_for_rendering(@discussions.flat_map(&:notes))
+
respond_to do |format|
format.html do
render 'show'