aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/public_body_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/public_body_controller.rb')
-rw-r--r--app/controllers/public_body_controller.rb15
1 files changed, 8 insertions, 7 deletions
diff --git a/app/controllers/public_body_controller.rb b/app/controllers/public_body_controller.rb
index 688cfab3d..4e5bf8ad7 100644
--- a/app/controllers/public_body_controller.rb
+++ b/app/controllers/public_body_controller.rb
@@ -102,13 +102,6 @@ class PublicBodyController < ApplicationController
and has_tag_string_tags.model = \'PublicBody\'
and has_tag_string_tags.name = ?) > 0', @locale, @tag]
end
- PublicBody.with_locale(@locale) do
- @public_bodies = PublicBody.paginate(
- :order => "public_body_translations.name", :page => params[:page], :per_page => 1000, # fit all councils on one page
- :conditions => conditions,
- :joins => :translations
- )
- end
if @tag.size == 1
@description = "beginning with '" + @tag + "'"
else
@@ -117,6 +110,14 @@ class PublicBodyController < ApplicationController
@description = @tag
end
end
+ PublicBody.with_locale(@locale) do
+ @public_bodies = PublicBody.paginate(
+ :order => "public_body_translations.name", :page => params[:page], :per_page => 1000, # fit all councils on one page
+ :conditions => conditions,
+ :joins => :translations
+ )
+ render :template => "public_body/list"
+ end
end
# Used so URLs like /local/islington work, for use e.g. writing to a local paper.