<% traces = [ ["Application Trace", @application_trace], ["Framework Trace", @framework_trace], ["Full Trace", @full_trace] ] names = traces.collect {|name, trace| name} %>

Rails.root: <%= defined?(Rails) && Rails.respond_to?(:root) ? Rails.root : "unset" %>

<% 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| %>
;">
<%=h trace.join "\n" %>
<% end %>