Skip to content

Instantly share code, notes, and snippets.

@trekr5
Created February 29, 2016 19:08
Show Gist options
  • Save trekr5/03adbdff11389c5dd7a3 to your computer and use it in GitHub Desktop.
Save trekr5/03adbdff11389c5dd7a3 to your computer and use it in GitHub Desktop.
index.html.erb
<tbody>
<table class="table">
<thead>
<tr>
<th>Client</th>
<th>Check</th>
<th>Output</th>
<th>Occurrences</th>
<th>Datacenter</th>
<th>Issued</th>
<th colspan="6"></th>
</tr>
</thead>
<tr>
<% @records.each do |record| %>
<tr bgcolor="99cc00">
<td width="60px"><%= record.source %></td>
<td><%= record.check %></td>
<td><%= record.output %></td>
<td><%= record.occurrences %></td>
<td><%= record.datacenter %></td>
<td><%= record.issued %></td>
<td><%= link_to 'Show', record %></td>
<td><%= link_to 'Edit', edit_record_path(record) %></td>
<td><%= link_to 'Destroy', record, method: :delete, data: { confirm: 'Are you sure?' } %></td>
<% record.winchecks.each do |s| %>
<tr bgcolor="99cc00">
<td><%= s.action %></td>
<td><%= s.check %></td>
<td><%= s.command %></td>
<td><%= s.duration %></td>
<td><%= s.executed %></td>
<td><%= s.handlers %></td>
<td><%= s.history %></td>
</tr>
<% end %>
</tr>
<% end %>
<!-- </tbody> -->
</table>
</tbody>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment