From 60cdcd55226318d23f5ddc9f419776d6d64e916d 2012-05-13 09:17:56 From: Jean-Philippe Lang Date: 2012-05-13 09:17:56 Subject: [PATCH] Redirect to referer when deleting a user (#10865). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.4-stable@9684 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index d22dd33..0c5fd9e 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -169,16 +169,16 @@ class UsersController < ApplicationController format.api { render_validation_errors(@user) } end end - rescue ::ActionController::RedirectBackError - redirect_to :controller => 'users', :action => 'edit', :id => @user end def destroy @user.destroy respond_to do |format| - format.html { redirect_to(users_url) } + format.html { redirect_to :back } format.api { head :ok } end + rescue ::ActionController::RedirectBackError + redirect_to(users_url) end def edit_membership