summaryrefslogtreecommitdiff
path: root/app/controllers/users_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/users_controller.rb')
-rw-r--r--app/controllers/users_controller.rb8
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