app/views/cadastro_externos/index.html.erb
<%= content_for :nav do%>
<%= render "layouts/navbar" %>
<% end %>
<h1>Cadastro Externos</h1>
<table>
<thead>
<tr>
<th>Cod barras</th>
<th>Nome</th>
<th>Marca</th>
<th>Descricao</th>
<th>Componentes</th>
<th colspan="3"></th>
</tr>
</thead>
<tbody>
<% @cadastro_externos.each do |cadastro_externo| %>
<tr>
<td><%= cadastro_externo.cod_barras %></td>
<td><%= cadastro_externo.nome %></td>
<td><%= cadastro_externo.marca %></td>
<td><%= cadastro_externo.descricao %></td>
<td><%= cadastro_externo.componentes %></td>
<td><%= link_to 'Show', cadastro_externo %></td>
<td><%= link_to 'Edit', edit_cadastro_externo_path(cadastro_externo) %></td>
<td><%= link_to 'Destroy', cadastro_externo, method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</tbody>
</table>
<br>
<%= link_to 'New Cadastro Externo', new_cadastro_externo_path %>