diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-02-08 05:42:34 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-02-08 05:42:34 +0300 |
commit | 3cd036e315576b8cd56f16965be6c4293b641a20 (patch) | |
tree | 7704725af660790ca79980a6f8da2db5b3efddbc /app/controllers/admin/users_controller.rb | |
parent | 49d6721329bd9fccf656bb750ee8f6c712852cf6 (diff) | |
parent | 9dbd7e5aec921e43f3ea89c8e3357ca0174b0937 (diff) |
Merge branch 'notification_email'
Conflicts:
db/schema.rb
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 e5d15528d78..232f30b759d 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 } |