From 08bbb9fce66cb46d3262e6cd4c4379b59f065be0 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Thu, 9 Mar 2017 19:29:11 -0600 Subject: Add option to start a new discussion on an MR --- app/models/discussion_note.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 app/models/discussion_note.rb (limited to 'app/models/discussion_note.rb') diff --git a/app/models/discussion_note.rb b/app/models/discussion_note.rb new file mode 100644 index 00000000000..fc168ae74a9 --- /dev/null +++ b/app/models/discussion_note.rb @@ -0,0 +1,9 @@ +class DiscussionNote < Note + NOTEABLE_TYPES = %w(MergeRequest).freeze + + validates :noteable_type, inclusion: { in: NOTEABLE_TYPES } + + def discussion_class(*) + SimpleDiscussion + end +end -- cgit v1.2.1