From b629d66b6bb24dfe89ab9046bb37225c6e81d5b5 Mon Sep 17 00:00:00 2001 From: francis Date: Tue, 1 Apr 2008 05:43:40 +0000 Subject: Use search query for front page part. --- app/controllers/general_controller.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'app/controllers/general_controller.rb') diff --git a/app/controllers/general_controller.rb b/app/controllers/general_controller.rb index 6930b1ddd..21450fddc 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.15 2008-04-01 00:36:56 francis Exp $ +# $Id: general_controller.rb,v 1.16 2008-04-01 05:43:40 francis Exp $ class GeneralController < ApplicationController @@ -33,7 +33,9 @@ class GeneralController < ApplicationController end # Get all successful requests for display on the right - @info_requests = InfoRequest.find :all, :order => "created_at desc", :conditions => "prominence = 'normal' and described_state in ('successful', 'partially_successful')", :limit => 3 + query = 'variety:response (status:successful OR status:partially_successful)' + sortby = "newest" + perform_search(query, sortby, 3) end -- cgit v1.2.3