aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/general_controller.rb
diff options
context:
space:
mode:
authorfrancis <francis>2009-10-03 10:23:43 +0000
committerfrancis <francis>2009-10-03 10:23:43 +0000
commit807414af4afbe82a5fffd6d149abb3f6c22c8b0b (patch)
tree1a7b85fbbb182fd753336ca7f3b5276029609549 /app/controllers/general_controller.rb
parent0f600fd35dd0c54d83c320432c388c281c670c92 (diff)
Random requests.
Diffstat (limited to 'app/controllers/general_controller.rb')
-rw-r--r--app/controllers/general_controller.rb8
1 files changed, 7 insertions, 1 deletions
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