summaryrefslogtreecommitdiff
path: root/users/app/controllers
diff options
context:
space:
mode:
authorjessib <jessib@leap.se>2012-12-07 10:31:12 -0800
committerjessib <jessib@leap.se>2012-12-07 10:31:12 -0800
commite1a004e2b24c2c235452469abfefa033e24435b2 (patch)
treea4b1c89a5aa4d5ccb3c17521499c999dedd5842d /users/app/controllers
parent4793c2b770fcb018303b7ab226b75cc218364327 (diff)
parent8282b83c798ba4e5c1e26ec8243b82669b3ee6d4 (diff)
Merge branch 'master' into help_develop
Conflicts: app/views/layouts/application.html.haml help/app/controllers/tickets_controller.rb help/test/functional/tickets_controller_test.rb users/test/support/stub_record_helper.rb
Diffstat (limited to 'users/app/controllers')
-rw-r--r--users/app/controllers/users_controller.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/users/app/controllers/users_controller.rb b/users/app/controllers/users_controller.rb
index 3407191..4921a4a 100644
--- a/users/app/controllers/users_controller.rb
+++ b/users/app/controllers/users_controller.rb
@@ -30,13 +30,15 @@ class UsersController < ApplicationController
end
def update
- @user.update_attributes(params[:user])
- respond_with @user
+ if @user.update_attributes(params[:user])
+ flash[:notice] = t(:user_updated_successfully)
+ end
+ respond_with @user, :location => edit_user_path(@user)
end
def destroy
@user.destroy
- redirect_to users_path
+ redirect_to admin? ? users_path : login_path
end
protected