Merge pull request #3392 from hiroponz/fix-non-ascii-char-username
Fix RoutingError when changing username to non ascii char.
This commit is contained in:
commit
6005ec894a
3 changed files with 33 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue