diff options
Diffstat (limited to 'app/controllers/general_controller.rb')
-rw-r--r-- | app/controllers/general_controller.rb | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/app/controllers/general_controller.rb b/app/controllers/general_controller.rb index 21e715424..cf28208a0 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)' @@ -168,5 +153,11 @@ class GeneralController < ApplicationController render :text => "awake\n" end + def custom_css + @locale = self.locale_from_params() + render(:layout => false, :content_type => 'text/css') + end + + end |