Commit c05ed99b authored by Robert Speicher's avatar Robert Speicher
Browse files

Simplify Event's target type-checking

parent 7f5253bd668c
...@@ -279,15 +279,15 @@ def note_short_commit_id ...@@ -279,15 +279,15 @@ def note_short_commit_id
end end
def note_commit? def note_commit?
target.noteable_type == "Commit" target.for_commit?
end end
def issue_note? def issue_note?
note? && target && target.noteable_type == "Issue" note? && target && target.for_issue?
end end
def note_project_snippet? def note_project_snippet?
target.noteable_type == "Snippet" target.for_snippet?
end end
def note_target def note_target
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