From 297ac55b295bd73f9f862e608639e62a9c444e84 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Mon, 2 Oct 2006 16:32:51 +0000 Subject: use instance vars in rescue templates since controller may not be instantiated yet git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5217 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- .../templates/rescues/_request_and_response.rhtml | 8 ++++---- .../lib/action_controller/templates/rescues/template_error.rhtml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'actionpack/lib/action_controller') diff --git a/actionpack/lib/action_controller/templates/rescues/_request_and_response.rhtml b/actionpack/lib/action_controller/templates/rescues/_request_and_response.rhtml index d949ffc837..82007ff5e6 100644 --- a/actionpack/lib/action_controller/templates/rescues/_request_and_response.rhtml +++ b/actionpack/lib/action_controller/templates/rescues/_request_and_response.rhtml @@ -8,7 +8,7 @@ <% if false %>

<% begin %> - <%= form_tag(request.request_uri, "method" => request.method) %> + <%= form_tag(@request.request_uri, "method" => @request.method) %> <% for key, values in params %> @@ -26,7 +26,7 @@ <% end %> <% - request_parameters_without_action = request.parameters.clone + request_parameters_without_action = @request.parameters.clone request_parameters_without_action.delete("action") request_parameters_without_action.delete("controller") @@ -37,8 +37,8 @@

Parameters: <%=h request_dump == "{}" ? "None" : request_dump %>

Show session dump

- +

Response

-Headers: <%=h response.headers.inspect.gsub(/,/, ",\n") %>
+Headers: <%=h @response.headers.inspect.gsub(/,/, ",\n") %>
diff --git a/actionpack/lib/action_controller/templates/rescues/template_error.rhtml b/actionpack/lib/action_controller/templates/rescues/template_error.rhtml index 827d66467d..2cf812cd5f 100644 --- a/actionpack/lib/action_controller/templates/rescues/template_error.rhtml +++ b/actionpack/lib/action_controller/templates/rescues/template_error.rhtml @@ -1,6 +1,6 @@

<%=h @exception.original_exception.class.to_s %> in - <%=h request.parameters["controller"].capitalize if request.parameters["controller"]%>#<%=h request.parameters["action"] %> + <%=h @request.parameters["controller"].capitalize if @request.parameters["controller"]%>#<%=h @request.parameters["action"] %>

-- cgit v1.2.3