aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/request_controller.rb
diff options
context:
space:
mode:
authorfrancis <francis>2008-01-04 16:15:40 +0000
committerfrancis <francis>2008-01-04 16:15:40 +0000
commit632b33cc0ca09c398bb1d4a21000b39987b53220 (patch)
tree6f053d1353869d04b60ce54b320dbc32d9b78ea0 /app/controllers/request_controller.rb
parentf30b34ecfd7c9916ee9b9034d5c4cd4cc7b42746 (diff)
Remove spurious "Outgoing messages is invalid" error
Diffstat (limited to 'app/controllers/request_controller.rb')
-rw-r--r--app/controllers/request_controller.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index 21af0d8b0..e665f690a 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.29 2008-01-04 15:27:18 francis Exp $
+# $Id: request_controller.rb,v 1.30 2008-01-04 16:15:40 francis Exp $
class RequestController < ApplicationController
@@ -25,7 +25,7 @@ class RequestController < ApplicationController
# Page new form posts to
def new
- # First time we get to the page, not everything is filled in
+ # First time we get to the page, just display it
if params[:submitted_new_request].nil?
# Read parameters in - public body can be passed from front page
@info_request = InfoRequest.new(params[:info_request])
@@ -52,6 +52,9 @@ class RequestController < ApplicationController
# See if values were valid or not
if !@existing_request.nil? || !@info_request.valid?
+ # We don't want the error "Outgoing messages is invalid", as the outgoing message
+ # will be valid for a specific reason which we are displaying anyway.
+ @info_request.errors.delete("outgoing_messages")
render :action => 'new'
elsif authenticated?(
:web => "To send your FOI request",