SMERM/EMUForm

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

Summary

Maintainability
Test Coverage
<p id="notice"><%= notice %></p>

<h1 class="entry-title">Listing Categories</h1>

<%= link_to 'New Category', new_category_path %>

<table>
  <thead>
    <tr>
      <th>Acro</th>
      <th>Title en</th>
      <th>Title it</th>
      <th>Description en</th>
      <th>Description it</th>
      <th colspan="3"></th>
    </tr>
  </thead>

  <tbody>
    <% @categories.each do |category| %>
      <tr>
        <td><%= category.acro %></td>
        <td><%= category.title_en %></td>
        <td><%= category.title_it %></td>
        <td><%= category.description_en %></td>
        <td><%= category.description_it %></td>
        <td><%= link_to 'Show', category %></td>
        <td><%= link_to 'Edit', edit_category_path(category) %></td>
        <td><%= link_to 'Destroy', category, method: :delete, data: { confirm: 'Are you sure?' } %></td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>