BigW Consortium Gitlab

Commit c05ed99b by Robert Speicher

Simplify Event's target type-checking

parent 6286b28b
...@@ -279,15 +279,15 @@ class Event < ActiveRecord::Base ...@@ -279,15 +279,15 @@ class Event < ActiveRecord::Base
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