From 807414af4afbe82a5fffd6d149abb3f6c22c8b0b Mon Sep 17 00:00:00 2001 From: francis Date: Sat, 3 Oct 2009 10:23:43 +0000 Subject: Random requests. --- app/controllers/general_controller.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'app/controllers/general_controller.rb') diff --git a/app/controllers/general_controller.rb b/app/controllers/general_controller.rb index 5c1f9590a..44c2507ec 100644 --- a/app/controllers/general_controller.rb +++ b/app/controllers/general_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: general_controller.rb,v 1.56 2009-10-02 23:44:45 francis Exp $ +# $Id: general_controller.rb,v 1.57 2009-10-03 10:23:43 francis Exp $ require 'xmlsimple' require 'open-uri' @@ -138,6 +138,12 @@ class GeneralController < ApplicationController @feed_autodetect = [ { :url => do_track_url(@track_thing, 'feed'), :title => @track_thing.params[:title_in_rss] } ] end + # Jump to a random request + def random_request + info_request = InfoRequest.random + redirect_to request_url(info_request) + end + # For debugging def fai_test sleep 10 -- cgit v1.2.3