2014-10-15 13:32:35 -04:00
|
|
|
<h1>Listing friendships</h1>
|
|
|
|
|
|
|
|
<table>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th colspan="3"></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
|
|
|
|
<tbody>
|
2014-10-24 11:04:28 -04:00
|
|
|
<% @friends.each do |friend| %>
|
2014-10-15 13:32:35 -04:00
|
|
|
<tr>
|
2014-10-24 11:04:28 -04:00
|
|
|
<td><%= friend.name %></td>
|
|
|
|
<td><%= link_to 'Destroy', friendship_path(friend), method: :delete,
|
|
|
|
data: { confirm: 'Are you sure?' } %></td>
|
2014-10-15 13:32:35 -04:00
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<br>
|
|
|
|
|
2014-10-15 16:46:36 -04:00
|
|
|
<%= link_to 'Add a Friend', users_path %>
|