Move unsubscribes to root

Otherwise conflits will occur while merging with CE
parent 725891d8
...@@ -2,7 +2,7 @@ module Emails ...@@ -2,7 +2,7 @@ module Emails
module AdminNotification module AdminNotification
def send_admin_notification(user_id, subject, body) def send_admin_notification(user_id, subject, body)
email = recipient(user_id) email = recipient(user_id)
@unsubscribe_url = public_unsubscribe_url(email: email) @unsubscribe_url = unsubscribe_url(email: email)
@body = body @body = body
mail to: email, subject: subject mail to: email, subject: subject
end end
......
%h3.page-title Unsubscribe from Admin notifications %h3.page-title Unsubscribe from Admin notifications
%hr %hr
= form_tag public_unsubscribe_path(@email) do = form_tag unsubscribe_path(@email) do
%p %p
Yes, I want to unsubscribe Yes, I want to unsubscribe
%strong= @email %strong= @email
......
...@@ -52,8 +52,6 @@ Gitlab::Application.routes.draw do ...@@ -52,8 +52,6 @@ Gitlab::Application.routes.draw do
# #
namespace :public do namespace :public do
resources :projects, only: [:index] resources :projects, only: [:index]
get 'unsubscribes/:email', to: 'unsubscribes#show', as: :unsubscribe
post 'unsubscribes/:email', to: 'unsubscribes#create'
root to: "projects#index" root to: "projects#index"
end end
...@@ -176,6 +174,8 @@ Gitlab::Application.routes.draw do ...@@ -176,6 +174,8 @@ Gitlab::Application.routes.draw do
end end
end end
get 'unsubscribes/:email', to: 'unsubscribes#show', as: :unsubscribe
post 'unsubscribes/:email', to: 'unsubscribes#create'
resources :projects, constraints: { id: /[^\/]+/ }, only: [:new, :create] resources :projects, constraints: { id: /[^\/]+/ }, only: [:new, :create]
devise_for :users, controllers: { omniauth_callbacks: :omniauth_callbacks, registrations: :registrations , passwords: :passwords, sessions: :sessions } devise_for :users, controllers: { omniauth_callbacks: :omniauth_callbacks, registrations: :registrations , passwords: :passwords, sessions: :sessions }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment