diff options
author | francis <francis> | 2008-09-07 17:43:11 +0000 |
---|---|---|
committer | francis <francis> | 2008-09-07 17:43:11 +0000 |
commit | 219c16e4c21c3567b07e95a428bc9d660f1926fe (patch) | |
tree | c4588ba14027e20bfe1c5bdafdac0b62667c1e5c | |
parent | 4a428250ed1f4ac1e321c7e34994fb8c7368bed2 (diff) |
Not important.
-rw-r--r-- | app/controllers/body_controller.rb | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/app/controllers/body_controller.rb b/app/controllers/body_controller.rb index 046ee2cd6..a50b9e906 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.15 2008-09-07 17:40:19 francis Exp $ +# $Id: body_controller.rb,v 1.16 2008-09-07 17:43:11 francis Exp $ class BodyController < ApplicationController # XXX tidy this up with better error messages, and a more standard infrastructure for the redirect to canonical URL @@ -40,7 +40,7 @@ class BodyController < ApplicationController def list @tag = params[:tag] if @tag.nil? - @tag = "" + @tag = "all" conditions = [] elsif @tag == 'other' category_list = PublicBody.categories.map{|c| "'"+c+"'"}.join(",") @@ -57,15 +57,12 @@ class BodyController < ApplicationController :order => "public_bodies.name", :page => params[:page], :per_page => 1000, # fit all councils on one page :conditions => conditions ) - @description = "All" - if !@tag.nil? - if @tag.size == 1 - @description = "beginning with '" + @tag + "'" - else - @description = PublicBody.categories_by_tag[@tag] - if @description.nil? - @description = @tag - end + if @tag.size == 1 + @description = "beginning with '" + @tag + "'" + else + @description = PublicBody.categories_by_tag[@tag] + if @description.nil? + @description = @tag end end end |