2018-07-25 05:30:33 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-03-30 23:06:09 -04:00
|
|
|
# A discussion to wrap a single `Note` note on the root of an issue, merge request,
|
2017-04-04 18:27:23 -04:00
|
|
|
# commit, or snippet, that is not displayed as a discussion.
|
2017-04-06 11:05:57 -04:00
|
|
|
#
|
|
|
|
# A discussion of this type is never resolvable.
|
2017-03-09 20:29:11 -05:00
|
|
|
class IndividualNoteDiscussion < Discussion
|
2017-04-06 11:05:57 -04:00
|
|
|
def self.note_class
|
|
|
|
Note
|
2017-03-09 20:29:11 -05:00
|
|
|
end
|
|
|
|
|
2017-03-17 15:25:52 -04:00
|
|
|
def individual_note?
|
2017-03-09 20:29:11 -05:00
|
|
|
true
|
|
|
|
end
|
2017-04-24 13:24:34 -04:00
|
|
|
|
|
|
|
def reply_attributes
|
|
|
|
super.tap { |attrs| attrs.delete(:discussion_id) }
|
|
|
|
end
|
2017-03-09 20:29:11 -05:00
|
|
|
end
|