diff options
author | Louise Crow <louise.crow@gmail.com> | 2013-07-29 18:24:17 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2013-07-29 18:48:52 +0100 |
commit | 34879219dabe3a9a813a3b30e4391d35e0bc8688 (patch) | |
tree | b0738b3d8fd9bdf43347ab78bc88036566d7869a /app/controllers/user_controller.rb | |
parent | 571004d84f0f5a0705e86d839d0fff62e31ccac2 (diff) |
Handle the case of a name that hits the character limits and has been suffixed with a number.
Diffstat (limited to 'app/controllers/user_controller.rb')
-rw-r--r-- | app/controllers/user_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index 1bf5a5316..175425280 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -19,8 +19,8 @@ class UserController < ApplicationController # Show page about a user def show long_cache - if MySociety::Format.simplify_url_part(params[:url_name], 'user', 32) != params[:url_name] - redirect_to :url_name => MySociety::Format.simplify_url_part(params[:url_name], 'user', 32), :status => :moved_permanently + if MySociety::Format.simplify_url_part(params[:url_name], 'user') != params[:url_name] + redirect_to :url_name => MySociety::Format.simplify_url_part(params[:url_name], 'user'), :status => :moved_permanently return end if params[:view].nil? |