cours0708/P5B/ruby/mon_projet/app/views/admin/addresses/index.rhtml

26 lines
638 B
Plaintext
Raw Normal View History

2008-11-25 21:11:16 +00:00
<h1>Listing addresses</h1>
<table>
<tr>
<th>Street</th>
<th>Postal code</th>
<th>City</th>
<th>Country</th>
</tr>
<% for address in @addresses %>
<tr>
<td><%=h address.street %></td>
<td><%=h address.postal_code %></td>
<td><%=h address.city %></td>
<td><%=h address.country %></td>
<td><%= link_to 'Show', address_path(address) %></td>
<td><%= link_to 'Edit', edit_address_path(address) %></td>
<td><%= link_to 'Destroy', address_path(address), :confirm => 'Are you sure?', :method => :delete %></td>
</tr>
<% end %>
</table>
<br />
<%= link_to 'New address', new_address_path %>