diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index 1c6585c27f..993ccbd122 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,3 +1,7 @@ +* Update error trace templates [Nicholas Seckar] + +* Stop showing generated routing code in application traces [Nicholas Seckar] + *1.10.0* (October 16th, 2005) * Make string-keys locals assigns optional. Add documentation describing depreciated state [skaes@web.de] diff --git a/actionpack/lib/action_controller/templates/rescues/_trace.rhtml b/actionpack/lib/action_controller/templates/rescues/_trace.rhtml index 897320d767..8175fbf18e 100644 --- a/actionpack/lib/action_controller/templates/rescues/_trace.rhtml +++ b/actionpack/lib/action_controller/templates/rescues/_trace.rhtml @@ -1,21 +1,24 @@ - -<% if @exception %> <% - clean_backtrace = @exception.clean_backtrace - app_trace = @exception.application_backtrace - framework_trace = clean_backtrace - app_trace - traces = {"Application Trace" => app_trace, "Framework Trace" => framework_trace, "Full Trace" => clean_backtrace} - trace_names = ["Application Trace", "Framework Trace", "Full Trace"] + traces = [ + ["Application Trace", @exception.application_backtrace], + ["Framework Trace", @exception.framework_backtrace], + ["Full Trace", @exception.clean_backtrace] + ] + names = traces.collect {|name, trace| name} %>
<%= traces[k].join "\n" %>
+ <% names.each do |name| -%>
+ <%
+ show = "document.getElementById('#{name.gsub /\s/, '-'}').style.display='block';"
+ hide = (names - [name]).collect {|hide_name| "document.getElementById('#{hide_name.gsub /\s/, '-'}').style.display='none';"}
+ %>
+ <%= name %> <%= '|' unless names.last == name %>
+ <% end -%>
+
+ <% traces.each do |name, trace| -%>
+ <%= trace.join "\n" %>