diff options
author | Robin Houston <robin.houston@gmail.com> | 2012-06-20 13:58:05 +0100 |
---|---|---|
committer | Robin Houston <robin.houston@gmail.com> | 2012-06-20 13:58:05 +0100 |
commit | a7cc84b9b2b430644fe23e6328d7ab289e7abf0a (patch) | |
tree | f327332c83d35741405be98641fa5b474db2179f /app/controllers/request_controller.rb | |
parent | 6ef57090e436e01bc5de801bc7acb6bfadb5c490 (diff) | |
parent | 89459d3902583fa3d6dad78462d2bf2fa6f94db6 (diff) |
Merge branch 'feature/public-body-api' into develop
Diffstat (limited to 'app/controllers/request_controller.rb')
-rw-r--r-- | app/controllers/request_controller.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb index bd2bfc974..2250747e1 100644 --- a/app/controllers/request_controller.rb +++ b/app/controllers/request_controller.rb @@ -54,7 +54,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 @@ -304,9 +304,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 |