提交 c05ed99b 编写于 作者: R Robert Speicher

Simplify Event's target type-checking

上级 6286b28b
......@@ -279,15 +279,15 @@ class Event < ActiveRecord::Base
end
def note_commit?
target.noteable_type == "Commit"
target.for_commit?
end
def issue_note?
note? && target && target.noteable_type == "Issue"
note? && target && target.for_issue?
end
def note_project_snippet?
target.noteable_type == "Snippet"
target.for_snippet?
end
def note_target
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册