diff options
author | azul <azul@riseup.net> | 2017-11-13 04:44:41 -0800 |
---|---|---|
committer | azul <azul@riseup.net> | 2017-11-13 04:44:41 -0800 |
commit | f250a11b4fd98bb9f4ef50c501b72f5ae2a97d1d (patch) | |
tree | e73c759f133da8bddd68ed8bd8168b1919f67989 /app/controllers | |
parent | a20a1c1671d3833c7f26b678f3e476b26126c8ca (diff) | |
parent | 028376fe1ea7638f0119ba9614629f66453d206f (diff) |
Merge branch 'fix/8796-alternate-email' into 'master'
fix: alternate email dialogue
Closes #8796
See merge request leap/webapp!53
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/users_controller.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index da82d1c..b4c98a0 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -31,6 +31,12 @@ class UsersController < ApplicationController def edit end + def update + @user.update_attributes user_params + flash[:notice] = I18n.t(:changes_saved) if @user.valid? + respond_with @user, location: edit_user_path(@user) + end + def deactivate @user.account.disable flash[:notice] = I18n.t("actions.user_disabled_message", username: @user.username) @@ -62,7 +68,7 @@ class UsersController < ApplicationController if admin? params.require(:user).permit(:effective_service_level) else - params.require(:user).permit(:password, :password_confirmation) + params.require(:user).permit(:contact_email) end end |