From 60cdcd55226318d23f5ddc9f419776d6d64e916d Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 13 May 2012 09:17:56 +0000 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 --- app/controllers/users_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index d22dd33cd..0c5fd9e89 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 -- 2.39.5