summaryrefslogtreecommitdiff
path: root/users/app/controllers/users_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'users/app/controllers/users_controller.rb')
-rw-r--r--users/app/controllers/users_controller.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/users/app/controllers/users_controller.rb b/users/app/controllers/users_controller.rb
index 4921a4a..811e8e5 100644
--- a/users/app/controllers/users_controller.rb
+++ b/users/app/controllers/users_controller.rb
@@ -30,8 +30,11 @@ class UsersController < ApplicationController
end
def update
- if @user.update_attributes(params[:user])
+ @user.attributes = params[:user]
+ if @user.changed? and @user.save
flash[:notice] = t(:user_updated_successfully)
+ else
+ flash[:error] = @user.errors.full_messages
end
respond_with @user, :location => edit_user_path(@user)
end