aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/request_controller.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index d02694183..b3689cefc 100644
--- a/app/controllers/request_controller.rb
+++ b/app/controllers/request_controller.rb
@@ -4,7 +4,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: request_controller.rb,v 1.60 2008-02-27 13:59:51 francis Exp $
+# $Id: request_controller.rb,v 1.61 2008-02-28 14:04:45 francis Exp $
class RequestController < ApplicationController
@@ -29,6 +29,11 @@ class RequestController < ApplicationController
last_event = @events_needing_description[-1]
@last_info_request_event_id = last_event.nil? ? nil : last_event.id
@new_responses_count = @events_needing_description.select {|i| i.event_type == 'response'}.size
+
+ # Sidebar stuff
+ @info_requests_same_user_same_body = InfoRequest.find(:all, :order => "created_at desc",
+ :conditions => ["prominence = 'normal' and user_id = ? and public_body_id = ?", @info_request.user_id, @info_request.public_body_id],
+ :limit => 5)
end
def list