2014-10-15 13:32:35 -04:00
|
|
|
<h1>Listing friendships</h1>
|
|
|
|
|
|
|
|
<table>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th colspan="3"></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
|
|
|
|
<tbody>
|
2014-10-27 11:06:31 -04:00
|
|
|
<% @friendships.each do |friendship| %>
|
2014-10-15 13:32:35 -04:00
|
|
|
<tr>
|
2014-10-27 11:06:31 -04:00
|
|
|
<td><%= friendship.friend.name %></td>
|
|
|
|
<td>[ <%= link_to 'Destroy', friendship, 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 %>
|