Sha256: 50a5c71dea6870c1b8ce5bf577d39f6bca4db159b5eee2f605342ddeb0351f7f

Contents?: true

Size: 478 Bytes

Versions: 1

Compression:

Stored size: 478 Bytes

Contents

<table>
  <thead>
  <tr>
    <% if data.empty? %>
      <th>Empty results!</th>
    <% else %>
      <% fields = data[0].keys  %>
      <% fields.each do |field| %>
        <th class="<%= css_for(field) %>"><%= field %></th>
      <% end %>
    <% end %>
  </tr>
  </thead>
  <tbody>
  <% data.each do |row| %>
    <tr>
      <% fields.each do |field| %>
        <td class="<%= css_for(field) %>"><%= row[field] %></td>
      <% end %>
    </tr>
  <% end %>
  </tbody>
</table>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
elefant-0.0.1 web/views/partials/generic_table.erb