index.html.erb 595 Bytes
<p id="notice"><%= notice %></p>

<h1>Listing Hosts</h1>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Uri</th>
      <th colspan="3"></th>
    </tr>
  </thead>

  <tbody>
    <% @hosts.each do |host| %>
      <tr>
        <td><%= host.name %></td>
        <td><%= host.uri %></td>
        <td><%= link_to 'Show', host %></td>
        <td><%= link_to 'Edit', edit_host_path(host) %></td>
        <td><%= link_to 'Destroy', host, method: :delete, data: { confirm: 'Are you sure?' } %></td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>

<%= link_to 'New host', new_host_path %>