diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-03-10 04:29:11 +0300 |
---|---|---|
committer | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-04-05 19:44:14 +0300 |
commit | 08bbb9fce66cb46d3262e6cd4c4379b59f065be0 (patch) | |
tree | 159eeb7ca43419f29926d6e77637db18bddd20a9 /app/models/discussion_note.rb | |
parent | 8bdfee8ba5fb0a8f48501e63274c8f9ce5708007 (diff) |
Add option to start a new discussion on an MR
Diffstat (limited to 'app/models/discussion_note.rb')
-rw-r--r-- | app/models/discussion_note.rb | 9 |
1 files changed, 9 insertions, 0 deletions
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 |