Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
be084908
Commit
be084908
authored
Jan 11, 2016
by
Zeger-Jan van de Weg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#can_unsubscribe? -> #?unsubscribable?
parent
26cedc7e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
app/controllers/sent_notifications_controller.rb
app/controllers/sent_notifications_controller.rb
+1
-1
app/models/sent_notification.rb
app/models/sent_notification.rb
+1
-1
app/views/layouts/notify.html.haml
app/views/layouts/notify.html.haml
+1
-1
No files found.
app/controllers/sent_notifications_controller.rb
View file @
be084908
...
@@ -3,7 +3,7 @@ class SentNotificationsController < ApplicationController
...
@@ -3,7 +3,7 @@ class SentNotificationsController < ApplicationController
def
unsubscribe
def
unsubscribe
@sent_notification
=
SentNotification
.
for
(
params
[
:id
])
@sent_notification
=
SentNotification
.
for
(
params
[
:id
])
return
render_404
unless
@sent_notification
&&
@sent_notification
.
can_unsubscrib
e?
return
render_404
unless
@sent_notification
&&
@sent_notification
.
unsubscribabl
e?
noteable
=
@sent_notification
.
noteable
noteable
=
@sent_notification
.
noteable
noteable
.
unsubscribe
(
@sent_notification
.
recipient
)
noteable
.
unsubscribe
(
@sent_notification
.
recipient
)
...
...
app/models/sent_notification.rb
View file @
be084908
...
@@ -62,7 +62,7 @@ class SentNotification < ActiveRecord::Base
...
@@ -62,7 +62,7 @@ class SentNotification < ActiveRecord::Base
end
end
end
end
def
can_unsubscrib
e?
def
unsubscribabl
e?
!
for_commit?
!
for_commit?
end
end
...
...
app/views/layouts/notify.html.haml
View file @
be084908
...
@@ -45,7 +45,7 @@
...
@@ -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.
-# 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
}
.
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 you'd like to receive fewer emails, you can
-
if
@sent_notification
&&
@sent_notification
.
can_unsubscrib
e?
-
if
@sent_notification
&&
@sent_notification
.
unsubscribabl
e?
=
link_to
"unsubscribe"
,
unsubscribe_sent_notification_url
(
@sent_notification
)
=
link_to
"unsubscribe"
,
unsubscribe_sent_notification_url
(
@sent_notification
)
from this thread or
from this thread or
adjust your notification settings.
adjust your notification settings.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment