diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-02-07 02:23:58 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-02-08 01:19:17 +0300 |
commit | 9dbd7e5aec921e43f3ea89c8e3357ca0174b0937 (patch) | |
tree | da089409d276cb6b048c52cb91a4d74f829ffda1 /app/controllers/admin/users_controller.rb | |
parent | bc57ff0ef023db3d07f1adfa6a309fb4a24ed203 (diff) |
Allow notification email to be set separately from primary email.
Closes #1932.
Diffstat (limited to 'app/controllers/admin/users_controller.rb')
-rw-r--r-- | app/controllers/admin/users_controller.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb index aea8545d38e..b4c78814a19 100644 --- a/app/controllers/admin/users_controller.rb +++ b/app/controllers/admin/users_controller.rb @@ -102,6 +102,9 @@ class Admin::UsersController < Admin::ApplicationController email = user.emails.find(params[:email_id]) email.destroy + user.set_notification_email + user.save if user.notification_email_changed? + respond_to do |format| format.html { redirect_to :back, notice: "Successfully removed email." } format.js { render nothing: true } |