diff options
author | Alfredo Sumaran <a.sumaran@gmail.com> | 2017-04-05 18:42:07 -0500 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2017-04-05 23:01:43 -0500 |
commit | 46f3e37ddf8625add29939868f189dc4db5336d6 (patch) | |
tree | 2294d0d6887198ef26b3226b4d4f0b637f993ace /app/models/note.rb | |
parent | 3871941df7f955d60c12cf53522ccc9965381388 (diff) | |
download | gitlab-ce-46f3e37ddf8625add29939868f189dc4db5336d6.tar.gz |
Customize Start discussion message according to if the noteable can be resolvable
Diffstat (limited to 'app/models/note.rb')
-rw-r--r-- | app/models/note.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/note.rb b/app/models/note.rb index 49ba4ad3f2e..cd4996bdbae 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -228,6 +228,10 @@ class Note < ActiveRecord::Base DiscussionNote::NOTEABLE_TYPES.include?(self.noteable_type) && !part_of_discussion? end + def can_be_resolvable? + DiscussionNote::RESOLVABLE_TYPES.include?(self.noteable_type) + end + def discussion_class(noteable = nil) # When commit notes are rendered on an MR's Discussion page, they are # displayed in one discussion instead of individually. |