aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/request_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/request_controller.rb')
-rw-r--r--app/controllers/request_controller.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index 334edbbff..693352c91 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.70 2008-04-03 16:09:25 francis Exp $
+# $Id: request_controller.rb,v 1.71 2008-04-04 01:59:40 francis Exp $
class RequestController < ApplicationController
@@ -30,6 +30,14 @@ class RequestController < ApplicationController
@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
+ # Already tracking?
+ @track_thing = TrackThing.create_track_for_request(@info_request)
+ if @user
+ @existing_track = TrackThing.find_by_existing_track(@user.id, @track_thing.track_query)
+ else
+ @existing_track = nil
+ end
+
# 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 = ? and id <> ?", @info_request.user_id, @info_request.public_body_id, @info_request.id],