summaryrefslogtreecommitdiff
path: root/users/app/controllers/users_controller.rb
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2012-12-13 17:17:30 +0100
committerAzul <azul@leap.se>2012-12-13 17:17:30 +0100
commita77d5cf5fd2ff6cc335b586477d6d6e58f758591 (patch)
tree32640ef2457ecce3a08f704f5b5b0ac00a37f9d8 /users/app/controllers/users_controller.rb
parent961fe13b784e7f44e55f9cd0a106728c69354a0f (diff)
parent32db6e2ee3ae449f2fe0f947f9ac4aafde340a9d (diff)
Merge branch 'master' into develop
Conflicts: users/test/unit/user_test.rb
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