aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/request_controller.rb
diff options
context:
space:
mode:
authorfrancis <francis>2008-02-21 19:05:00 +0000
committerfrancis <francis>2008-02-21 19:05:00 +0000
commit110dca68cf07abf83b235ef28e2e6ff8f8fe217e (patch)
tree4ccf7d18e2343b85096faa10e39057ca5c090838 /app/controllers/request_controller.rb
parentab9d0c103031adcfcc5e6b28876e01b048c04319 (diff)
make the /new pages only specific to specific public body, rather than having drop down.
Diffstat (limited to 'app/controllers/request_controller.rb')
-rw-r--r--app/controllers/request_controller.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index 9642d48ad..288a4ef7b 100644
--- a/app/controllers/request_controller.rb
+++ b/app/controllers/request_controller.rb
@@ -4,7 +4,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: request_controller.rb,v 1.54 2008-02-21 16:37:11 francis Exp $
+# $Id: request_controller.rb,v 1.55 2008-02-21 19:05:00 francis Exp $
class RequestController < ApplicationController
@@ -58,7 +58,12 @@ class RequestController < ApplicationController
end
@info_request = InfoRequest.new(params[:info_request])
@outgoing_message = OutgoingMessage.new(params[:outgoing_message])
- render :action => 'new'
+
+ if @info_request.public_body.nil?
+ redirect_to frontpage_url
+ else
+ render :action => 'new'
+ end
return
end