summaryrefslogtreecommitdiff
path: root/app/models/note.rb
diff options
context:
space:
mode:
authorAlfredo Sumaran <a.sumaran@gmail.com>2017-04-05 18:42:07 -0500
committerAlfredo Sumaran <alfredo@gitlab.com>2017-04-05 23:01:43 -0500
commit46f3e37ddf8625add29939868f189dc4db5336d6 (patch)
tree2294d0d6887198ef26b3226b4d4f0b637f993ace /app/models/note.rb
parent3871941df7f955d60c12cf53522ccc9965381388 (diff)
downloadgitlab-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.rb4
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.