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
a881e4cc
Commit
a881e4cc
authored
Aug 12, 2014
by
Jan-Willem van der Meer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move unsubscribes to root
Otherwise conflits will occur while merging with CE
parent
725891d8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
app/controllers/unsubscribes_controller.rb
app/controllers/unsubscribes_controller.rb
+0
-0
app/mailers/emails/admin_notification.rb
app/mailers/emails/admin_notification.rb
+1
-1
app/views/unsubscribes/show.html.haml
app/views/unsubscribes/show.html.haml
+1
-1
config/routes.rb
config/routes.rb
+2
-2
No files found.
app/controllers/
public/
unsubscribes_controller.rb
→
app/controllers/unsubscribes_controller.rb
View file @
a881e4cc
File moved
app/mailers/emails/admin_notification.rb
View file @
a881e4cc
...
...
@@ -2,7 +2,7 @@ module Emails
module
AdminNotification
def
send_admin_notification
(
user_id
,
subject
,
body
)
email
=
recipient
(
user_id
)
@unsubscribe_url
=
public_
unsubscribe_url
(
email:
email
)
@unsubscribe_url
=
unsubscribe_url
(
email:
email
)
@body
=
body
mail
to:
email
,
subject:
subject
end
...
...
app/views/
public/
unsubscribes/show.html.haml
→
app/views/unsubscribes/show.html.haml
View file @
a881e4cc
%h3
.page-title
Unsubscribe from Admin notifications
%hr
=
form_tag
public_
unsubscribe_path
(
@email
)
do
=
form_tag
unsubscribe_path
(
@email
)
do
%p
Yes, I want to unsubscribe
%strong
=
@email
...
...
config/routes.rb
View file @
a881e4cc
...
...
@@ -52,8 +52,6 @@ Gitlab::Application.routes.draw do
#
namespace
:public
do
resources
:projects
,
only:
[
:index
]
get
'unsubscribes/:email'
,
to:
'unsubscribes#show'
,
as: :unsubscribe
post
'unsubscribes/:email'
,
to:
'unsubscribes#create'
root
to:
"projects#index"
end
...
...
@@ -176,6 +174,8 @@ Gitlab::Application.routes.draw do
end
end
get
'unsubscribes/:email'
,
to:
'unsubscribes#show'
,
as: :unsubscribe
post
'unsubscribes/:email'
,
to:
'unsubscribes#create'
resources
:projects
,
constraints:
{
id:
/[^\/]+/
},
only:
[
:new
,
:create
]
devise_for
:users
,
controllers:
{
omniauth_callbacks: :omniauth_callbacks
,
registrations: :registrations
,
passwords: :passwords
,
sessions: :sessions
}
...
...
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