diff options
Diffstat (limited to 'app/controllers/track_controller.rb')
-rw-r--r-- | app/controllers/track_controller.rb | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/app/controllers/track_controller.rb b/app/controllers/track_controller.rb index 43264be67..f1f9c1fd3 100644 --- a/app/controllers/track_controller.rb +++ b/app/controllers/track_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: track_controller.rb,v 1.9 2008-04-30 00:46:00 francis Exp $ +# $Id: track_controller.rb,v 1.10 2008-05-12 01:37:50 francis Exp $ class TrackController < ApplicationController @@ -24,6 +24,20 @@ class TrackController < ApplicationController end end + # Track all new requests + def track_new_requests + @track_thing = TrackThing.create_track_for_all_new_requests + ret = self.track_set + if ret + if @track_thing.track_medium == 'feed' + redirect_to :controller => 'track', :action => 'atom_feed', :track_id => @track_thing.id + else + flash[:notice] = "You are " + ret + " being told about any new requests!" + redirect_to request_list_url(:view => nil) + end + end + end + # Generic request tracker - set @track_thing before calling def track_set if @user |