diff options
author | francis <francis> | 2008-08-09 00:25:28 +0000 |
---|---|---|
committer | francis <francis> | 2008-08-09 00:25:28 +0000 |
commit | 5500b18613f39b0bfcff52183bbfe4edf7f933ba (patch) | |
tree | c9910c8a9f86fbbb6b1bd9f7f8d223c066b61c0a /app/controllers/track_controller.rb | |
parent | 9fa74a64b2e4a77f292b8f4b648477fc2d4684e3 (diff) |
Display RSS link on same line as form for unsubscribe.
Diffstat (limited to 'app/controllers/track_controller.rb')
-rw-r--r-- | app/controllers/track_controller.rb | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/app/controllers/track_controller.rb b/app/controllers/track_controller.rb index bf4e8e138..e78d3959c 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.25 2008-08-08 20:48:48 francis Exp $ +# $Id: track_controller.rb,v 1.26 2008-08-09 00:25:28 francis Exp $ class TrackController < ApplicationController @@ -16,8 +16,9 @@ class TrackController < ApplicationController return atom_feed_internal if params[:feed] == 'feed' - ret = self.track_set - redirect_to request_url(@info_request) + if self.track_set + redirect_to request_url(@info_request) + end end # Track all new/successful requests @@ -34,8 +35,9 @@ class TrackController < ApplicationController return atom_feed_internal if params[:feed] == 'feed' - ret = self.track_set - redirect_to request_list_url(:view => @view) + if self.track_set + redirect_to request_list_url(:view => @view) + end end # Track all updates to a particular public body @@ -45,8 +47,9 @@ class TrackController < ApplicationController return atom_feed_internal if params[:feed] == 'feed' - ret = self.track_set - redirect_to public_body_url(@public_body) + if self.track_set + redirect_to public_body_url(@public_body) + end end # Track a user @@ -56,8 +59,9 @@ class TrackController < ApplicationController return atom_feed_internal if params[:feed] == 'feed' - ret = self.track_set - redirect_to user_url(@track_user) + if self.track_set + redirect_to user_url(@track_user) + end end # Track a search term @@ -68,10 +72,11 @@ class TrackController < ApplicationController @query = query_array.join("/") @track_thing = TrackThing.create_track_for_search_query(@query) - return atom_feed_internal if params[:feed] + return atom_feed_internal if params[:feed] == 'feed' - ret = self.track_set - redirect_to search_url(@query) + if self.track_set + redirect_to search_url(@query) + end end # Generic request tracker - set @track_thing before calling @@ -80,7 +85,7 @@ class TrackController < ApplicationController @existing_track = TrackThing.find_by_existing_track(@user, @track_thing) if @existing_track flash[:notice] = "You are already being emailed updates about " + @track_thing.params[:list_description] - return + return true end end @@ -93,6 +98,7 @@ class TrackController < ApplicationController @track_thing.save! flash[:notice] = "You will now be emailed updates about " + @track_thing.params[:list_description] + return true end # Atom feed (like RSS) for the track |