aboutsummaryrefslogtreecommitdiffstats
path: root/app/helpers/link_to_helper.rb
diff options
context:
space:
mode:
authorfrancis <francis>2008-05-12 08:35:24 +0000
committerfrancis <francis>2008-05-12 08:35:24 +0000
commitf743dbb49a82ccd38a4c24a682c60a1ae1663258 (patch)
tree5ac98f9cc347f54008a314d1140cdba49e7da191 /app/helpers/link_to_helper.rb
parent3caa59078b3f0c2673797690df10aab4249c6ef2 (diff)
Generalise links to tracking.
Diffstat (limited to 'app/helpers/link_to_helper.rb')
-rw-r--r--app/helpers/link_to_helper.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/app/helpers/link_to_helper.rb b/app/helpers/link_to_helper.rb
index bc0bdbafe..75b2a9589 100644
--- a/app/helpers/link_to_helper.rb
+++ b/app/helpers/link_to_helper.rb
@@ -5,7 +5,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: link_to_helper.rb,v 1.26 2008-04-30 00:37:50 francis Exp $
+# $Id: link_to_helper.rb,v 1.27 2008-05-12 08:35:25 francis Exp $
module LinkToHelper
@@ -81,6 +81,17 @@ module LinkToHelper
link_to h(user.name), user_admin_url(user)
end
+ # Teacks
+ def do_track_url(track_thing)
+ if track_thing.track_type == 'request_updates'
+ track_request_url(:url_title => track_thing.info_request.url_title)
+ elsif track_thing.track_type == 'all_new_requests'
+ track_new_requests_url
+ else
+ raise "unknown tracking type " + track_thing.track_type
+ end
+ end
+
# General pages
def search_url(query, sortby = nil)
if sortby.nil?