Move #to_discussion to NoteOnDiff

This commit is contained in:
Sean McGivern 2016-08-30 16:30:42 +01:00
parent 43d5011718
commit 9b57ad382e
3 changed files with 4 additions and 8 deletions

View file

@ -28,4 +28,8 @@ module NoteOnDiff
def can_be_award_emoji?
false
end
def to_discussion
Discussion.new([self])
end
end

View file

@ -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?

View file

@ -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,