aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/request_controller.rb
diff options
context:
space:
mode:
authorfrancis <francis>2008-05-12 01:53:41 +0000
committerfrancis <francis>2008-05-12 01:53:41 +0000
commit3223d1fd68312980433caf99d73d5faa0a63b7f0 (patch)
tree5966769609eb679ac31c9b8b71c41cbd8e1654b4 /app/controllers/request_controller.rb
parent88f03dc73549a7072da511e32dae7d63a19c5481 (diff)
Show if already tracking new requests.
Diffstat (limited to 'app/controllers/request_controller.rb')
-rw-r--r--app/controllers/request_controller.rb11
1 files changed, 5 insertions, 6 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index 8a128ea30..7bf2deba0 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.80 2008-05-12 01:37:50 francis Exp $
+# $Id: request_controller.rb,v 1.81 2008-05-12 01:53:41 francis Exp $
class RequestController < ApplicationController
@@ -42,11 +42,7 @@ class RequestController < ApplicationController
# 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
+ @existing_track = TrackThing.find_by_existing_track(@user, @track_thing.track_query)
end
def list
@@ -56,6 +52,9 @@ class RequestController < ApplicationController
@title = "Recently sent Freedom of Information requests"
query = "variety:sent";
sortby = "newest"
+ # Already tracking?
+ @track_thing = TrackThing.create_track_for_all_new_requests()
+ @existing_track = TrackThing.find_by_existing_track(@user, @track_thing.track_query)
elsif @view == 'successful'
@title = "Recent successful responses"
query = 'variety:response (status:successful OR status:partially_successful)'