diff options
author | Sean McGivern <sean@gitlab.com> | 2016-08-30 16:30:42 +0100 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2016-08-30 16:30:42 +0100 |
commit | 9b57ad382e69044eb851f64cc0eb35896baa712a (patch) | |
tree | 0f298c060195b4f7bc0eaccd4dfdaa325d900c84 | |
parent | 43d50117187db1d8e034dbfc01e894a108f55369 (diff) | |
download | gitlab-ce-21211-comment-on-diff-partially-broken-after-updating-to-8-11.tar.gz |
Move #to_discussion to NoteOnDiff21211-comment-on-diff-partially-broken-after-updating-to-8-11
-rw-r--r-- | app/models/concerns/note_on_diff.rb | 4 | ||||
-rw-r--r-- | app/models/diff_note.rb | 4 | ||||
-rw-r--r-- | app/models/legacy_diff_note.rb | 4 |
3 files changed, 4 insertions, 8 deletions
diff --git a/app/models/concerns/note_on_diff.rb b/app/models/concerns/note_on_diff.rb index a881fb83b7f..b8dd27a7afe 100644 --- a/app/models/concerns/note_on_diff.rb +++ b/app/models/concerns/note_on_diff.rb @@ -28,4 +28,8 @@ module NoteOnDiff def can_be_award_emoji? false end + + def to_discussion + Discussion.new([self]) + end end diff --git a/app/models/diff_note.rb b/app/models/diff_note.rb index c8320ff87fa..4442cefc7e9 100644 --- a/app/models/diff_note.rb +++ b/app/models/diff_note.rb @@ -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? diff --git a/app/models/legacy_diff_note.rb b/app/models/legacy_diff_note.rb index 0e1649aafe5..40277a9b139 100644 --- a/app/models/legacy_diff_note.rb +++ b/app/models/legacy_diff_note.rb @@ -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, |