Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #6339 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

[PATCH] changing @request -> request; removing deprecation error

Reported by: adam Assigned to: David
Priority: normal Milestone: 1.2
Component: ActionPack Version: edge
Severity: normal Keywords: deprecate @request request @response response
Cc:

Description

just a little deprecation cleanup.

uhm...maybe I'm just bleary eyed, but I can't see the place to attach an uploaded file. huh! So here is the patch pasted below.

Adam

Index: actionpack/lib/action_controller/templates/rescues/_request_and_response.rhtml
===================================================================
--- actionpack/lib/action_controller/templates/rescues/_request_and_response.rhtml      (revision 5222)
+++ actionpack/lib/action_controller/templates/rescues/_request_and_response.rhtml      (working copy)
@@ -8,7 +8,7 @@
 <% if false %>
   <br /><br />
   <% begin %>
-    <%= form_tag(@request.request_uri, "method" => @request.method) %>
+    <%= form_tag(request.request_uri, "method" => request.method) %>
       <input type="hidden" name="BP-RETRY" value="1" />
   
       <% 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 @@
 <p><b>Parameters</b>: <%=h request_dump == "{}" ? "None" : request_dump %></p>
 
 <p><a href="#" onclick="document.getElementById('session_dump').style.display='block'; return false;">Show session dump</a></p>
-<div id="session_dump" style="display:none"><%= debug(@request.session.instance_variable_get("@data")) %></div>
+<div id="session_dump" style="display:none"><%= debug(request.session.instance_variable_get("@data")) %></div>
 
 
 <h2 style="margin-top: 30px">Response</h2>
-<b>Headers</b>: <%=h @response.headers.inspect.gsub(/,/, ",\n") %><br/>
+<b>Headers</b>: <%=h response.headers.inspect.gsub(/,/, ",\n") %><br/>

Change History

10/09/06 00:17:12 changed by david

  • status changed from new to closed.
  • resolution set to fixed.

(In [5239]) Deprecation cleanup for rescues (closes #6339) [adam]