mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
Add constraints to remove dots from username. (#4255)
Rails is using dots as a separator for formatted routes. As a result if the username has more than one dot it will not match the route. Bug raised here -> https://meta.discourse.org/t/refreshing-a-users-detail-page-in-admin-doesnt-work-in-some-cases/44891
This commit is contained in:
parent
f53494f102
commit
42ec8a7c3d
1 changed files with 1 additions and 1 deletions
|
@ -115,7 +115,7 @@ Discourse::Application.routes.draw do
|
|||
post "reset_bounce_score"
|
||||
end
|
||||
get "users/:id.json" => 'users#show', defaults: {format: 'json'}
|
||||
get 'users/:id/:username' => 'users#show'
|
||||
get 'users/:id/:username' => 'users#show', constraints: {username: USERNAME_ROUTE_FORMAT}
|
||||
get 'users/:id/:username/badges' => 'users#show'
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue