summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-03-30 15:07:11 -0700
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-03-30 15:07:11 -0700
commit6005ec894a726cfa54685b703a4ea74a961f3956 (patch)
tree977101564d36a2595dd176d919dcdb80bc99d474 /app
parent4449ac3ad18f1c9a3cb6840389643720d840df48 (diff)
parent33e236c63124e5c59dba5979d641ba174f4a1479 (diff)
downloadgitlab-ce-6005ec894a726cfa54685b703a4ea74a961f3956.tar.gz
Merge pull request #3392 from hiroponz/fix-non-ascii-char-username
Fix RoutingError when changing username to non ascii char.
Diffstat (limited to 'app')
-rw-r--r--app/controllers/admin/users_controller.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb
index 43e6f09904f..20cb13e7746 100644
--- a/app/controllers/admin/users_controller.rb
+++ b/app/controllers/admin/users_controller.rb
@@ -84,6 +84,8 @@ class Admin::UsersController < Admin::ApplicationController
format.html { redirect_to [:admin, admin_user], notice: 'User was successfully updated.' }
format.json { head :ok }
else
+ # restore username to keep form action url.
+ admin_user.username = params[:id]
format.html { render action: "edit" }
format.json { render json: admin_user.errors, status: :unprocessable_entity }
end