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

22 lines
531 B
Plaintext
Raw Permalink Normal View History

2008-11-25 21:11:16 +00:00
<h1>Listing customers</h1>
<table>
<tr>
<th>Firstname</th>
<th>Name</th>
</tr>
<% for customer in @customers %>
<tr>
<td><%=h customer.firstname %></td>
<td><%=h customer.name %></td>
<td><%= link_to 'Show', customer_path(customer) %></td>
<td><%= link_to 'Edit', edit_customer_path(customer) %></td>
<td><%= link_to 'Destroy', customer_path(customer), :confirm => 'Are you sure?', :method => :delete %></td>
</tr>
<% end %>
</table>
<br />
<%= link_to 'New customer', new_customer_path %>