aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/general_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/general_controller.rb')
-rw-r--r--app/controllers/general_controller.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/controllers/general_controller.rb b/app/controllers/general_controller.rb
index 839064fcd..5a7b006a0 100644
--- a/app/controllers/general_controller.rb
+++ b/app/controllers/general_controller.rb
@@ -32,8 +32,7 @@ class GeneralController < ApplicationController
if body_short_names.empty?
# This is too slow
@popular_bodies = PublicBody.find(:all,
- :select => "public_bodies.*, (select count(*) from info_requests where info_requests.public_body_id = public_bodies.id) as c",
- :order => "c desc",
+ :order => "info_requests_count desc",
:limit => 32,
:conditions => conditions,
:joins => :translations