aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/request_controller.rb
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2012-06-27 14:15:09 +0100
committerSeb Bacon <seb.bacon@gmail.com>2012-06-27 14:15:09 +0100
commitaf24b1e306dab3ebe10d97f7777abedd011321da (patch)
treeb440b839bf1e7465ab154cdc19ee9366b9f98198 /app/controllers/request_controller.rb
parent6c4c822ef7a4491bf821326af779e5be9118c0a1 (diff)
parent5b80d1b9a0933b1e20de013d1aa8b8522f2ad066 (diff)
Merge branch 'release/0.6.1'0.6.1
Diffstat (limited to 'app/controllers/request_controller.rb')
-rw-r--r--app/controllers/request_controller.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index 2f5b4d643..7f42eeb7e 100644
--- a/app/controllers/request_controller.rb
+++ b/app/controllers/request_controller.rb
@@ -59,7 +59,7 @@ class RequestController < ApplicationController
# Look up by old style numeric identifiers
if params[:url_title].match(/^[0-9]+$/)
@info_request = InfoRequest.find(params[:url_title].to_i)
- redirect_to request_url(@info_request)
+ redirect_to request_url(@info_request, :format => params[:format])
return
end
@@ -309,9 +309,11 @@ 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.
+ # We don't want the error "Outgoing messages is invalid", as in this
+ # case the list of errors will also contain a more specific error
+ # describing the reason it is invalid.
@info_request.errors.delete("outgoing_messages")
+
render :action => 'new'
return
end