summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-03-30 20:34:14 -0600
committerLuke "Jared" Bennett <lbennett@gitlab.com>2017-04-05 17:44:14 +0100
commitfe26b8af94e8e12a66249e28e34196a4f8b987c4 (patch)
treed4a2978d3d28afdb45b69f177293167dd018717a /app/models
parentbb8cc946689bfafb1e3a65aa00b8e75fb8a5006b (diff)
downloadgitlab-ce-fe26b8af94e8e12a66249e28e34196a4f8b987c4.tar.gz
Correctly display multiple separate discussions on the same diff line
Diffstat (limited to 'app/models')
-rw-r--r--app/models/note.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/models/note.rb b/app/models/note.rb
index 3db1656ba57..9d4f99ac9c8 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -109,10 +109,9 @@ class Note < ActiveRecord::Base
def grouped_diff_discussions
diff_notes.
fresh.
+ discussions.
select(&:active?).
- group_by(&:line_code).
- map { |line_code, notes| [line_code, DiffDiscussion.build(notes)] }.
- to_h
+ group_by(&:line_code)
end
def count_for_collection(ids, type)