pboling/rack-insight

View on GitHub
lib/rack/insight/views/panels/request_variables.html.erb

Summary

Maintainability
Test Coverage
<% ["GET", "POST", "Session", "Cookies", "SERVER VARIABLES", "Rack ENV"].each do |header|
next unless sections.has_key?(header)
%>
<h3><%=header%></h3>
<table id="request_variables">
  <thead>
    <tr>
      <th>Variable</th>
      <th>Value</th>
    </tr>
  </thead>
  <tbody>
    <% i = 1 %>
    <% sections[header].each do |key, val| %>
      <tr class="<%= i % 2 == 0 ? "even" : "odd" %>">
        <td><%=h key %></td>
        <td class="code"><div>
            <%=h val%>
        </div></td>
      </tr>
      <% i += 1 %>
    <% end %>
  </tbody>
</table>
<% end %>