<% traces = { "Application Trace" => @application_trace, "Framework Trace" => @framework_trace, "Full Trace" => @full_trace } names = traces.keys %>

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

<% names.each do |name| %> <% show = "show('#{name.gsub(/\s/, '-')}');" hide = (names - [name]).collect {|hide_name| "hide('#{hide_name.gsub(/\s/, '-')}');"} %> <%= name %> <%= '|' unless names.last == name %> <% end %> <% traces.each do |name, trace| %>
;">
<%= trace.join "\n" %>
<% end %>