diff options
author | Robert Speicher <rspeicher@gmail.com> | 2016-05-08 14:46:43 -0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-05-16 14:52:03 -0500 |
commit | c05ed99bff637f51d16cc34663b911e46295a473 (patch) | |
tree | a5325a84029db53b538cfb056610f0e25671ac93 /app/models/event.rb | |
parent | 6286b28bbc9b62af729c45c45f953f5426f5bf52 (diff) | |
download | gitlab-ce-c05ed99bff637f51d16cc34663b911e46295a473.tar.gz |
Simplify Event's target type-checking
Diffstat (limited to 'app/models/event.rb')
-rw-r--r-- | app/models/event.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/event.rb b/app/models/event.rb index b54fbe6f7e8..a617694b7dd 100644 --- a/app/models/event.rb +++ b/app/models/event.rb @@ -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 |