Commit c05ed99b authored by Robert Speicher's avatar Robert Speicher

Simplify Event's target type-checking

parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment