Abbreviate RAILS_ROOT in traces

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2688 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Jamis Buck 2005-10-19 15:56:21 +00:00
parent 2555b885ed
commit 4da2d6c1ed
2 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,8 @@
*SVN*
* Abbreviate RAILS_ROOT in traces
*1.10.1* (October 19th, 2005)
* Update error trace templates [Nicholas Seckar]

View File

@ -4,9 +4,14 @@
["Framework Trace", @exception.framework_backtrace],
["Full Trace", @exception.clean_backtrace]
]
if defined?(RAILS_ROOT)
traces.each { |name, trace| trace.map! { |p| p.gsub(/^#{RAILS_ROOT}/, '<b>#{RAILS_ROOT}</b>') } }
end
names = traces.collect {|name, trace| name}
%>
<p><code>RAILS_ROOT: <%= RAILS_ROOT %></code></p>
<div id="traces">
<% names.each do |name| -%>
<%