Commit 9b57ad38 authored by Sean McGivern's avatar Sean McGivern

Move #to_discussion to NoteOnDiff

parent 43d50117
......@@ -28,4 +28,8 @@ module NoteOnDiff
def can_be_award_emoji?
false
end
def to_discussion
Discussion.new([self])
end
end
......@@ -107,10 +107,6 @@ class DiffNote < Note
self.noteable.find_diff_discussion(self.discussion_id)
end
def to_discussion
Discussion.new([self])
end
private
def supported?
......
......@@ -53,10 +53,6 @@ class LegacyDiffNote < Note
self.line_code
end
def to_discussion
Discussion.new([self])
end
# Check if this note is part of an "active" discussion
#
# This will always return true for anything except MergeRequest noteables,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment