Skip to content
Snippets Groups Projects
Commit be084908 authored by Zeger-Jan van de Weg's avatar Zeger-Jan van de Weg
Browse files

#can_unsubscribe? -> #?unsubscribable?

parent 26cedc7e
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -3,7 +3,7 @@ class SentNotificationsController < ApplicationController
 
def unsubscribe
@sent_notification = SentNotification.for(params[:id])
return render_404 unless @sent_notification && @sent_notification.can_unsubscribe?
return render_404 unless @sent_notification && @sent_notification.unsubscribable?
 
noteable = @sent_notification.noteable
noteable.unsubscribe(@sent_notification.recipient)
Loading
Loading
Loading
Loading
@@ -62,7 +62,7 @@ class SentNotification < ActiveRecord::Base
end
end
 
def can_unsubscribe?
def unsubscribable?
!for_commit?
end
 
Loading
Loading
Loading
Loading
@@ -45,7 +45,7 @@
-# Don't link the host is the line below, one link in the email is easier to quickly click than two.
You're receiving this email because of your account on #{Gitlab.config.gitlab.host}.
If you'd like to receive fewer emails, you can
- if @sent_notification && @sent_notification.can_unsubscribe?
- if @sent_notification && @sent_notification.unsubscribable?
= link_to "unsubscribe", unsubscribe_sent_notification_url(@sent_notification)
from this thread or
adjust your notification settings.
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment