<h1>Listing magazines</h1>

<table>
  <tr>
    <th>Title</th>
    <th>Issue</th>
  </tr>

<% @magazines.each do |magazine| %>
  <tr>
    <td><%=h magazine.title %></td>
    <td><%=h magazine.issue %></td>
    <td><%= link_to 'Show', magazine %></td>
    <td><%= link_to 'Edit', edit_magazine_path(magazine) %></td>
    <td><%= link_to 'Destroy', magazine, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New magazine', new_magazine_path %>