summaryrefslogtreecommitdiff
path: root/app/models/legacy_diff_note.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-03-09 19:29:11 -0600
committerLuke "Jared" Bennett <lbennett@gitlab.com>2017-04-05 17:44:14 +0100
commit08bbb9fce66cb46d3262e6cd4c4379b59f065be0 (patch)
tree159eeb7ca43419f29926d6e77637db18bddd20a9 /app/models/legacy_diff_note.rb
parent8bdfee8ba5fb0a8f48501e63274c8f9ce5708007 (diff)
downloadgitlab-ce-08bbb9fce66cb46d3262e6cd4c4379b59f065be0.tar.gz
Add option to start a new discussion on an MR
Diffstat (limited to 'app/models/legacy_diff_note.rb')
-rw-r--r--app/models/legacy_diff_note.rb10
1 files changed, 2 insertions, 8 deletions
diff --git a/app/models/legacy_diff_note.rb b/app/models/legacy_diff_note.rb
index 40277a9b139..4952a1ce2ca 100644
--- a/app/models/legacy_diff_note.rb
+++ b/app/models/legacy_diff_note.rb
@@ -7,10 +7,8 @@ class LegacyDiffNote < Note
before_create :set_diff
- class << self
- def build_discussion_id(noteable_type, noteable_id, line_code)
- [super(noteable_type, noteable_id), line_code].join("-")
- end
+ def discussion_class(*)
+ LegacyDiffDiscussion
end
def legacy_diff_note?
@@ -119,8 +117,4 @@ class LegacyDiffNote < Note
diffs = noteable.raw_diffs(Commit.max_diff_options)
diffs.find { |d| d.new_path == self.diff.new_path }
end
-
- def build_discussion_id
- self.class.build_discussion_id(noteable_type, noteable_id || commit_id, line_code)
- end
end