diff options
author | Sato Hiroyuki <sathiroyuki@gmail.com> | 2013-03-26 14:42:08 +0900 |
---|---|---|
committer | Sato Hiroyuki <sathiroyuki@gmail.com> | 2013-03-26 14:47:11 +0900 |
commit | 33e236c63124e5c59dba5979d641ba174f4a1479 (patch) | |
tree | e530c4117d83e8dd56df90726bcfc035d2029e25 /app/controllers/admin/users_controller.rb | |
parent | 90db28d6d0a031cad8dc58bc5936e381ce82a764 (diff) | |
download | gitlab-ce-33e236c63124e5c59dba5979d641ba174f4a1479.tar.gz |
Fix RoutingError when changing username to non ascii char.
Diffstat (limited to 'app/controllers/admin/users_controller.rb')
-rw-r--r-- | app/controllers/admin/users_controller.rb | 2 |
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 |