diff --git a/app/controllers/sent_notifications_controller.rb b/app/controllers/sent_notifications_controller.rb
index 93dcc16094f76f9bd6045815a39b4560b49e6b8d..b7008c82bf22ba05d8029541bdd47368c45abc21 100644
--- a/app/controllers/sent_notifications_controller.rb
+++ b/app/controllers/sent_notifications_controller.rb
@@ -3,14 +3,14 @@ class SentNotificationsController < ApplicationController
 
   def unsubscribe
     @sent_notification = SentNotification.for(params[:id])
-    return render_404 unless @sent_notification && !@sent_notification.for_commit?
+    return render_404 unless @sent_notification && @sent_notification.can_unsubscribe?
 
     noteable = @sent_notification.noteable
     noteable.unsubscribe(@sent_notification.recipient)
 
     flash[:notice] = "You have been unsubscribed from this thread."
     if current_user
-      case @sent_notification.noteable
+      case noteable
       when Issue
         redirect_to issue_path(noteable)
       when MergeRequest
diff --git a/app/mailers/emails/notes.rb b/app/mailers/emails/notes.rb
index ccd33b880f7fb11189aaa2f94352fa44f72366a9..f9650df9a743726eef6719cba80b5536496c38a7 100644
--- a/app/mailers/emails/notes.rb
+++ b/app/mailers/emails/notes.rb
@@ -1,7 +1,7 @@
 module Emails
   module Notes
     def note_commit_email(recipient_id, note_id)
-      note_mail_with_notification(note_id, recipient_id)
+      setup_note_mail(note_id, recipient_id)
 
       @commit = @note.noteable
       @target_url = namespace_project_commit_url(*note_target_url_options)
@@ -13,7 +13,7 @@ module Emails
     end
 
     def note_issue_email(recipient_id, note_id)
-      note_mail_with_notification(note_id, recipient_id)
+      setup_note_mail(note_id, recipient_id)
 
       @issue = @note.noteable
       @target_url = namespace_project_issue_url(*note_target_url_options)
@@ -21,7 +21,7 @@ module Emails
     end
 
     def note_merge_request_email(recipient_id, note_id)
-      note_mail_with_notification(note_id, recipient_id)
+      setup_note_mail(note_id, recipient_id)
 
       @merge_request = @note.noteable
       @target_url = namespace_project_merge_request_url(*note_target_url_options)
@@ -42,7 +42,7 @@ module Emails
       }
     end
 
-    def note_mail_with_notification(note_id, recipient_id)
+    def setup_note_mail(note_id, recipient_id)
       @note = Note.find(note_id)
       @project = @note.project
 
diff --git a/config/routes.rb b/config/routes.rb
index 2739e4961f7c5ffa682b4505a140925efdd1e90f..0fd72ae78eb075ef0f260c49a2d0303ec7909dc7 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -88,7 +88,7 @@ Rails.application.routes.draw do
     end
   end
 
-  resources :sent_notifications, only: [], constraints: { id: /[0-9a-f]{32}/ } do
+  resources :sent_notifications, only: [], constraints: { id: /\h{32}/ } do
     member do
       get :unsubscribe
     end
diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb
index 08ade644643a8e2f819546ebf498392763235f3b..8f86c491d3fc820164199cb257bd108811851b51 100644
--- a/spec/mailers/notify_spec.rb
+++ b/spec/mailers/notify_spec.rb
@@ -108,7 +108,7 @@ describe Notify do
     it { is_expected.to have_body_text /unsubscribe/ }
   end
 
-  shared_examples "a user can not unsubscribe through footer link" do
+  shared_examples "a user cannot unsubscribe through footer link" do
     it { is_expected.not_to have_body_text /unsubscribe/ }
   end
 
@@ -123,7 +123,7 @@ describe Notify do
     it_behaves_like 'an email sent from GitLab'
     it_behaves_like 'a new user email', new_user_address
     it_behaves_like 'it should not have Gmail Actions links'
-    it_behaves_like 'a user can not unsubscribe through footer link'
+    it_behaves_like 'a user cannot unsubscribe through footer link'
 
     it 'contains the password text' do
       is_expected.to have_body_text /Click here to set your password/
@@ -152,7 +152,7 @@ describe Notify do
     it_behaves_like 'an email sent from GitLab'
     it_behaves_like 'a new user email', new_user_address
     it_behaves_like 'it should not have Gmail Actions links'
-    it_behaves_like 'a user can not unsubscribe through footer link'
+    it_behaves_like 'a user cannot unsubscribe through footer link'
 
     it 'should not contain the new user\'s password' do
       is_expected.not_to have_body_text /password/
@@ -166,7 +166,7 @@ describe Notify do
 
     it_behaves_like 'an email sent from GitLab'
     it_behaves_like 'it should not have Gmail Actions links'
-    it_behaves_like 'a user can not unsubscribe through footer link'
+    it_behaves_like 'a user cannot unsubscribe through footer link'
 
     it 'is sent to the new user' do
       is_expected.to deliver_to key.user.email
@@ -191,7 +191,7 @@ describe Notify do
     subject { Notify.new_email_email(email.id) }
 
     it_behaves_like 'it should not have Gmail Actions links'
-    it_behaves_like 'a user can not unsubscribe through footer link'
+    it_behaves_like 'a user cannot unsubscribe through footer link'
 
     it 'is sent to the new user' do
       is_expected.to deliver_to email.user.email
@@ -465,7 +465,7 @@ describe Notify do
 
       it_behaves_like 'an email sent from GitLab'
       it_behaves_like 'it should not have Gmail Actions links'
-      it_behaves_like "a user can not unsubscribe through footer link"
+      it_behaves_like "a user cannot unsubscribe through footer link"
 
       it 'has the correct subject' do
         is_expected.to have_subject /Project was moved/
@@ -488,7 +488,7 @@ describe Notify do
 
       it_behaves_like 'an email sent from GitLab'
       it_behaves_like 'it should not have Gmail Actions links'
-      it_behaves_like "a user can not unsubscribe through footer link"
+      it_behaves_like "a user cannot unsubscribe through footer link"
 
       it 'has the correct subject' do
         is_expected.to have_subject /Access to project was granted/
@@ -539,7 +539,7 @@ describe Notify do
         it_behaves_like 'a note email'
         it_behaves_like 'an answer to an existing thread', 'commit'
         it_behaves_like 'it should show Gmail Actions View Commit link'
-        it_behaves_like "a user can not unsubscribe through footer link"
+        it_behaves_like "a user cannot unsubscribe through footer link"
 
         it 'has the correct subject' do
           is_expected.to have_subject /#{commit.title} \(#{commit.short_id}\)/
@@ -603,7 +603,7 @@ describe Notify do
 
     it_behaves_like 'an email sent from GitLab'
     it_behaves_like 'it should not have Gmail Actions links'
-    it_behaves_like "a user can not unsubscribe through footer link"
+    it_behaves_like "a user cannot unsubscribe through footer link"
 
     it 'has the correct subject' do
       is_expected.to have_subject /Access to group was granted/
@@ -632,7 +632,7 @@ describe Notify do
     subject { ActionMailer::Base.deliveries.last }
 
     it_behaves_like 'an email sent from GitLab'
-    it_behaves_like "a user can not unsubscribe through footer link"
+    it_behaves_like "a user cannot unsubscribe through footer link"
 
     it 'is sent to the new user' do
       is_expected.to deliver_to 'new-email@mail.com'
@@ -655,7 +655,7 @@ describe Notify do
     subject { Notify.repository_push_email(project.id, 'devs@company.name', author_id: user.id, ref: 'refs/heads/master', action: :create) }
 
     it_behaves_like 'it should not have Gmail Actions links'
-    it_behaves_like "a user can not unsubscribe through footer link"
+    it_behaves_like "a user cannot unsubscribe through footer link"
 
     it 'is sent as the author' do
       sender = subject.header[:from].addrs[0]
@@ -684,7 +684,7 @@ describe Notify do
     subject { Notify.repository_push_email(project.id, 'devs@company.name', author_id: user.id, ref: 'refs/tags/v1.0', action: :create) }
 
     it_behaves_like 'it should not have Gmail Actions links'
-    it_behaves_like "a user can not unsubscribe through footer link"
+    it_behaves_like "a user cannot unsubscribe through footer link"
 
     it 'is sent as the author' do
       sender = subject.header[:from].addrs[0]
@@ -712,7 +712,7 @@ describe Notify do
     subject { Notify.repository_push_email(project.id, 'devs@company.name', author_id: user.id, ref: 'refs/heads/master', action: :delete) }
 
     it_behaves_like 'it should not have Gmail Actions links'
-    it_behaves_like "a user can not unsubscribe through footer link"
+    it_behaves_like "a user cannot unsubscribe through footer link"
 
     it 'is sent as the author' do
       sender = subject.header[:from].addrs[0]
@@ -736,7 +736,7 @@ describe Notify do
     subject { Notify.repository_push_email(project.id, 'devs@company.name', author_id: user.id, ref: 'refs/tags/v1.0', action: :delete) }
 
     it_behaves_like 'it should not have Gmail Actions links'
-    it_behaves_like "a user can not unsubscribe through footer link"
+    it_behaves_like "a user cannot unsubscribe through footer link"
 
     it 'is sent as the author' do
       sender = subject.header[:from].addrs[0]
@@ -764,7 +764,7 @@ describe Notify do
     subject { Notify.repository_push_email(project.id, 'devs@company.name', author_id: user.id, ref: 'refs/heads/master', action: :push, compare: compare, reverse_compare: false, send_from_committer_email: send_from_committer_email) }
 
     it_behaves_like 'it should not have Gmail Actions links'
-    it_behaves_like "a user can not unsubscribe through footer link"
+    it_behaves_like "a user cannot unsubscribe through footer link"
 
     it 'is sent as the author' do
       sender = subject.header[:from].addrs[0]
@@ -870,7 +870,7 @@ describe Notify do
     subject { Notify.repository_push_email(project.id, 'devs@company.name', author_id: user.id, ref: 'refs/heads/master', action: :push, compare: compare) }
 
     it_behaves_like 'it should show Gmail Actions View Commit link'
-    it_behaves_like "a user can not unsubscribe through footer link"
+    it_behaves_like "a user cannot unsubscribe through footer link"
 
     it 'is sent as the author' do
       sender = subject.header[:from].addrs[0]