aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/body_controller.rb
diff options
context:
space:
mode:
authorfrancis <francis>2009-06-16 22:21:13 +0000
committerfrancis <francis>2009-06-16 22:21:13 +0000
commit74c12dc0808fe8752aaf3c4832ad26fb37ca6df0 (patch)
treee5fb6588306f6ec833c98fd2ed38fb20ac943419 /app/controllers/body_controller.rb
parente9a60b303fda16571d957ddc811c33dd9af6faab (diff)
Change name of historic URL finding function.
Make it remove duplicates - so if finds same short name multiple times in history of one body, it returns that body.
Diffstat (limited to 'app/controllers/body_controller.rb')
-rw-r--r--app/controllers/body_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/body_controller.rb b/app/controllers/body_controller.rb
index 7fb649842..cd72356d1 100644
--- a/app/controllers/body_controller.rb
+++ b/app/controllers/body_controller.rb
@@ -4,7 +4,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: body_controller.rb,v 1.25 2009-03-24 13:05:01 tony Exp $
+# $Id: body_controller.rb,v 1.26 2009-06-16 22:21:13 francis Exp $
class BodyController < ApplicationController
# XXX tidy this up with better error messages, and a more standard infrastructure for the redirect to canonical URL
@@ -14,7 +14,7 @@ class BodyController < ApplicationController
return
end
- @public_body = PublicBody.find_by_urlname(params[:url_name])
+ @public_body = PublicBody.find_by_url_name_with_historic(params[:url_name])
raise "None found" if @public_body.nil? # XXX proper 404
# If found by historic name, redirect to new name