<%= header_section %>
<%= body_section %>

<h1>住所一覧</h1>

<table>
  <tr>
    <th>名前</th>
    <th>メールアドレス</th>
    <th>郵便番号</th>
    <th>住所</th>
    <th>電話番号</th>
  </tr>

<% @addresses.each do |address| %>
  <tr>
    <td><%=h address.name.force_encoding('utf-8') %></td>
    <td><%=h address.mail.force_encoding('utf-8') %></td>
    <td><%=h address.zipcode.force_encoding('utf-8') %></td>
    <td><%=h address.address.force_encoding('utf-8') %></td>
    <td><%=h address.phone.force_encoding('utf-8') %></td>
    <td><a href="show.rb?id=<%=h address.id %>">表示</a></td>
    <td><a href="destroy.rb?id=<%=h address.id %>">削除</a></td>
  </tr>
<% end %>
</table>

<br />

<a href="new.rb">新しい住所の追加</a>

<%= footer_section %>
