2007-02-20 19:29:44 -05:00
|
|
|
<%
|
|
|
|
traces = [
|
2010-01-16 22:34:35 -05:00
|
|
|
["Application Trace", @application_trace],
|
|
|
|
["Framework Trace", @framework_trace],
|
|
|
|
["Full Trace", @full_trace]
|
2007-02-20 19:29:44 -05:00
|
|
|
]
|
|
|
|
names = traces.collect {|name, trace| name}
|
|
|
|
%>
|
|
|
|
|
2009-11-29 01:37:50 -05:00
|
|
|
<p><code>Rails.root: <%= defined?(Rails) && Rails.respond_to?(:root) ? Rails.root : "unset" %></code></p>
|
2007-02-20 19:29:44 -05:00
|
|
|
|
|
|
|
<div id="traces">
|
2008-02-07 12:06:53 -05:00
|
|
|
<% names.each do |name| %>
|
2007-02-20 19:29:44 -05:00
|
|
|
<%
|
|
|
|
show = "document.getElementById('#{name.gsub /\s/, '-'}').style.display='block';"
|
|
|
|
hide = (names - [name]).collect {|hide_name| "document.getElementById('#{hide_name.gsub /\s/, '-'}').style.display='none';"}
|
|
|
|
%>
|
2009-09-18 13:35:42 -04:00
|
|
|
<a href="#" onclick="<%= hide.join %><%= show %>; return false;"><%= name %></a> <%= '|' unless names.last == name %>
|
2008-02-07 12:06:53 -05:00
|
|
|
<% end %>
|
2007-02-20 19:29:44 -05:00
|
|
|
|
2008-02-07 12:06:53 -05:00
|
|
|
<% traces.each do |name, trace| %>
|
2010-09-28 15:09:31 -04:00
|
|
|
<div id="<%= name.gsub /\s/, '-' %>" style="display: <%= (name == "Application Trace") ? 'block' : 'none' %>;">
|
2009-09-18 13:35:42 -04:00
|
|
|
<pre><code><%=h trace.join "\n" %></code></pre>
|
2007-02-20 19:29:44 -05:00
|
|
|
</div>
|
2008-02-07 12:06:53 -05:00
|
|
|
<% end %>
|
|
|
|
</div>
|