1
0
Fork 0

List friends, but still not working

This commit is contained in:
Andrew Tomaka 2014-10-24 11:04:28 -04:00
parent 32fccb4a8d
commit c30167e192
2 changed files with 4 additions and 4 deletions

View File

@ -3,7 +3,6 @@ class FriendshipsController < ApplicationController
def index
@friends = current_user.friends
@friendships = Friendship.all
end
def create

View File

@ -8,10 +8,11 @@
</thead>
<tbody>
<% @friends.each do |friendship| %>
<% @friends.each do |friend| %>
<tr>
<td><%= friendship.name %></td>
<td><%= link_to 'Destroy', friendship, method: :delete, data: { confirm: 'Are you sure?' } %></td>
<td><%= friend.name %></td>
<td><%= link_to 'Destroy', friendship_path(friend), method: :delete,
data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</tbody>