ChaelCodes/HuntersKeepers

View on GitHub
app/views/moves/index.html.erb

Summary

Maintainability
Test Coverage
<h1><%= t('.title') %></h1>

<table class="table">
  <thead>
    <tr>
      <th><%= t('.source') %></th>
      <th>Name</th>
      <th><%= t('.rating') %></th>
      <th colspan="2"></th>
    </tr>
  </thead>

  <tbody>
    <% @moves.each do |move| %>
      <tr>
        <td><%= move_source(move) %></td>
        <td><%= link_to_move(move) %></td>
        <td><%= move.rating %></td>
        <td><%= link_to t('.edit_link'), edit_move_path(move) %></td>
        <td><%= link_to t('.destroy_link'), move_path(move), method: :delete, data: { confirm: 'Are you sure?' } %></td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>

<%= link_to t('.new_move'), new_move_path %>