summaryrefslogtreecommitdiff
path: root/app/models/note.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-03-31 17:39:14 -0600
committerDouwe Maan <douwe@selenight.nl>2017-04-08 14:37:46 -0500
commitb202b42cfee6bb8cf0c142c918c545f45464a29c (patch)
treebcdc1d30a4ec2c11fd4b388cac69a450051943e6 /app/models/note.rb
parent3d1cade13f61115b63bf6dbda5a1f194ba54b24b (diff)
downloadgitlab-ce-b202b42cfee6bb8cf0c142c918c545f45464a29c.tar.gz
Link to outdated diff in older MR version from outdated diff discussion
Diffstat (limited to 'app/models/note.rb')
-rw-r--r--app/models/note.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/models/note.rb b/app/models/note.rb
index 1ea7b946061..c85692c5aec 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -113,11 +113,11 @@ class Note < ActiveRecord::Base
Discussion.build(notes)
end
- def grouped_diff_discussions
+ def grouped_diff_discussions(diff_refs = nil)
diff_notes.
fresh.
discussions.
- select(&:active?).
+ select { |n| n.active?(diff_refs) }.
group_by(&:line_code)
end
@@ -140,6 +140,10 @@ class Note < ActiveRecord::Base
true
end
+ def latest_merge_request_diff
+ nil
+ end
+
def max_attachment_size
current_application_settings.max_attachment_size.megabytes.to_i
end