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

Changeset 1246

Show
Ignore:
Timestamp:
04/30/05 08:19:14 (3 years ago)
Author:
david
Message:

Removed dumping of template assigns on the rescue page as it would very easily include a ton of data making page loads take seconds (and the information was rarely helpful) #1222

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/CHANGELOG

    r1241 r1246  
    11*SVN* 
     2 
     3* Removed dumping of template assigns on the rescue page as it would very easily include a ton of data making page loads take seconds (and the information was rarely helpful) #1222 
    24 
    35* Added BenchmarkHelper that can measure the execution time of a block in a template and reports the result to the log. Example: 
  • trunk/actionpack/lib/action_controller/templates/rescues/_request_and_response.rhtml

    r986 r1246  
    3434  session_dump  = @request.session.instance_variable_get("@data").inspect.gsub(/,/, ",\n") 
    3535  response_dump = @response.inspect.gsub(/,/, ",\n") 
    36  
    37   template_assigns = @response.template.instance_variable_get("@assigns") 
    38   %w( response exception template session request template_root template_class url ignore_missing_templates logger cookies headers params ).each { |t| template_assigns.delete(t) } 
    39   template_dump = template_assigns.inspect.gsub(/,/, ",\n") 
    4036%> 
    4137 
     
    4945<h2 style="margin-top: 30px">Response</h2> 
    5046<b>Headers</b>: <%=h @response.headers.inspect.gsub(/,/, ",\n") %><br/> 
    51  
    52 <p><a href="#" onclick="document.getElementById('template_dump').style.display='block'; return false;">Show template parameters</a></p> 
    53 <div id="template_dump" style="display:none"><%= debug(template_assigns) %></div>