diff options
-rw-r--r-- | app/controllers/body_controller.rb | 3 | ||||
-rw-r--r-- | spec/controllers/body_controller_spec.rb | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/app/controllers/body_controller.rb b/app/controllers/body_controller.rb index 78ccb520c..046ee2cd6 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.14 2008-09-07 16:55:55 francis Exp $ +# $Id: body_controller.rb,v 1.15 2008-09-07 17:40:19 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,6 +40,7 @@ class BodyController < ApplicationController def list @tag = params[:tag] if @tag.nil? + @tag = "" conditions = [] elsif @tag == 'other' category_list = PublicBody.categories.map{|c| "'"+c+"'"}.join(",") diff --git a/spec/controllers/body_controller_spec.rb b/spec/controllers/body_controller_spec.rb index f56172c7a..b1aa5823a 100644 --- a/spec/controllers/body_controller_spec.rb +++ b/spec/controllers/body_controller_spec.rb @@ -45,7 +45,7 @@ describe BodyController, "when listing bodies" do response.should render_template('list') assigns[:public_bodies].should == [ public_bodies(:humpadink_public_body), public_bodies(:geraldine_public_body) ] - assigns[:tag].should be_nil + assigns[:tag].should == "" assigns[:description].should == "All" end |