aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/general_controller.rb
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2011-01-13 19:18:56 +0000
committerSeb Bacon <seb.bacon@gmail.com>2011-03-10 10:06:41 +0000
commit59462ac90b067dd67b0908b9924b23eb74a505bd (patch)
treeee35ba587ee3345ab64feb870f7bf220695573cc /app/controllers/general_controller.rb
parent92e3dbbfdfdca9b34683ada7eb0127b550732fe5 (diff)
make site_name a globally available helper
Diffstat (limited to 'app/controllers/general_controller.rb')
-rw-r--r--app/controllers/general_controller.rb17
1 files changed, 1 insertions, 16 deletions
diff --git a/app/controllers/general_controller.rb b/app/controllers/general_controller.rb
index 21e715424..df46c4ae8 100644
--- a/app/controllers/general_controller.rb
+++ b/app/controllers/general_controller.rb
@@ -22,22 +22,7 @@ class GeneralController < ApplicationController
def frontpage
behavior_cache do
# This is too slow
- #@popular_bodies = PublicBody.find(:all, :select => "*, (select count(*) from info_requests where info_requests.public_body_id = public_bodies.id) as c", :order => "c desc", :limit => 32)
-
- # Just hardcode some popular authorities for now
- # ('tgq', 'atbra' is for debugging on Francis's development environment)
- @popular_bodies = PublicBody.find(:all, :conditions => ["url_name in (
- 'bbc',
- 'dwp',
- 'dh',
- 'snh',
- 'royal_mail_group',
- 'mod',
- 'kent_county_council',
- 'wirral_borough_council'
- /* , 'tgq', 'atbra' */
- )"]).sort_by { |pb| pb.url_name }.reverse # just an order that looks better
-
+ @popular_bodies = PublicBody.find(:all, :select => "*, (select count(*) from info_requests where info_requests.public_body_id = public_bodies.id) as c", :order => "c desc", :limit => 32)
# Get some successful requests #
begin
query = 'variety:response (status:successful OR status:partially_successful)'