diff options
author | francis <francis> | 2008-09-04 17:59:08 +0000 |
---|---|---|
committer | francis <francis> | 2008-09-04 17:59:08 +0000 |
commit | a3fa7134a03068f078a3d8a69d7de94f4fd8f0bc (patch) | |
tree | 6838d4b11f0b90c657890c1b3e679a543db7857e /app/controllers/general_controller.rb | |
parent | 8bfd0ab3bcb077ba0ead0fa7b0e921cbc511691a (diff) |
Show better list of sample stuff on new front page.
Diffstat (limited to 'app/controllers/general_controller.rb')
-rw-r--r-- | app/controllers/general_controller.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/controllers/general_controller.rb b/app/controllers/general_controller.rb index 6bd2ed2fb..9e197d8e8 100644 --- a/app/controllers/general_controller.rb +++ b/app/controllers/general_controller.rb @@ -5,7 +5,7 @@ # Copyright (c) 2008 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: general_controller.rb,v 1.35 2008-09-03 09:03:57 francis Exp $ +# $Id: general_controller.rb,v 1.36 2008-09-04 17:59:08 francis Exp $ class GeneralController < ApplicationController @@ -40,7 +40,8 @@ class GeneralController < ApplicationController # New, improved front page! def new_frontpage - @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 => 16).in_groups_of(8) + @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 => 8) + @random_requests = InfoRequest.find(:all, :order => "random()", :limit => 8, :conditions => ["described_state = ? and prominence = ?", 'successful', 'normal'] ) end # Just does a redirect from ?query= search to /query |