aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2012-07-17 10:01:13 +0100
committerSeb Bacon <seb.bacon@gmail.com>2012-07-17 10:01:13 +0100
commit00d67fc7aeb839af3a5f02a242b4bb8c29b9383d (patch)
treed5d38d2be30dc0c8ec353af682cf33bf00ebefc6 /app/controllers
parent65ca069257d3ff1292d510d794082c58a8d3afb1 (diff)
parentf340cb41b3d27936dc2900894bdd35c9c16e8fc9 (diff)
Merge branch 'develop' of github.com:sebbacon/alaveteli into develop
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/admin_request_controller.rb2
-rw-r--r--app/controllers/api_controller.rb5
2 files changed, 4 insertions, 3 deletions
diff --git a/app/controllers/admin_request_controller.rb b/app/controllers/admin_request_controller.rb
index fd1405319..ae4bb511a 100644
--- a/app/controllers/admin_request_controller.rb
+++ b/app/controllers/admin_request_controller.rb
@@ -28,7 +28,7 @@ class AdminRequestController < AdminController
@info_request = InfoRequest.find(params[:id])
# XXX is this *really* the only way to render a template to a
# variable, rather than to the response?
- vars = OpenStruct.new(:name_to => @info_request.user.name,
+ vars = OpenStruct.new(:name_to => @info_request.user_name,
:name_from => MySociety::Config.get("CONTACT_NAME", 'Alaveteli'),
:info_request => @info_request, :reason => params[:reason],
:info_request_url => 'http://' + MySociety::Config.get('DOMAIN') + request_url(@info_request),
diff --git a/app/controllers/api_controller.rb b/app/controllers/api_controller.rb
index 4db07b4c9..718c31e6f 100644
--- a/app/controllers/api_controller.rb
+++ b/app/controllers/api_controller.rb
@@ -151,8 +151,9 @@ class ApiController < ApplicationController
mail = RequestMailer.create_external_response(request, body, sent_at, attachment_hashes)
request.receive(mail, mail.encoded, true)
end
-
- head :no_content
+ render :json => {
+ 'url' => make_url("request", request.url_title),
+ }
end
def body_request_events