diff options
author | Zeger-Jan van de Weg <mail@zjvandeweg.nl> | 2016-01-09 12:47:31 +0100 |
---|---|---|
committer | Zeger-Jan van de Weg <mail@zjvandeweg.nl> | 2016-01-09 12:47:31 +0100 |
commit | 36d858bcf98868426256ce51a28e7029b38e0c2d (patch) | |
tree | 7a1b458c65ebc46ad3533dd361a753621c418d89 /app/models/sent_notification.rb | |
parent | 58867eff46dc6886b85bfe5a787341f224d09421 (diff) | |
download | gitlab-ce-36d858bcf98868426256ce51a28e7029b38e0c2d.tar.gz |
Add #can_unsubscribe? to SentNotification
Diffstat (limited to 'app/models/sent_notification.rb')
-rw-r--r-- | app/models/sent_notification.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/sent_notification.rb b/app/models/sent_notification.rb index fd12615717b..03108da17be 100644 --- a/app/models/sent_notification.rb +++ b/app/models/sent_notification.rb @@ -62,6 +62,10 @@ class SentNotification < ActiveRecord::Base end end + def can_unsubscribe? + !for_commit? + end + def for_commit? noteable_type == "Commit" end |