Commit dcbf7d13 authored by Robert Speicher's avatar Robert Speicher

Make better use of the `Note#for_*?` methods

We've got all these polymorphic type-checking methods, might as well use
'em everywhere it makes sense.
parent 9bbf873e
......@@ -87,7 +87,7 @@ class Note < ActiveRecord::Base
next if discussion_ids.include?(note.discussion_id)
# don't group notes for the main target
if !note.for_diff_line? && note.noteable_type == "MergeRequest"
if !note.for_diff_line? && note.for_merge_request?
discussions << [note]
else
discussions << notes.select do |other_note|
......@@ -383,7 +383,7 @@ class Note < ActiveRecord::Base
private
def awards_supported?
(noteable.kind_of?(Issue) || noteable.is_a?(MergeRequest)) && !for_diff_line?
(for_issue? || for_merge_request?) && !for_diff_line?
end
def contains_emoji_only?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment