1
0
Fork 0
find-us-lunch/app/views/friendships/index.html.erb

29 lines
648 B
Text
Raw Normal View History

2014-10-27 12:25:36 -04:00
<h2>Friends List</h2>
2014-10-15 13:32:35 -04:00
2014-10-27 12:16:50 -04:00
<table class="table table-striped table-hover">
2014-10-15 13:32:35 -04:00
<thead>
<tr>
2014-10-27 12:16:50 -04:00
<th>Name</th>
<th>Created</th>
<th>Updated</th>
<th>Actions</th>
2014-10-15 13:32:35 -04:00
</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 12:25:36 -04:00
<td><%= link_to friendship.friend.name, friendship.friend %></td>
2014-10-27 12:16:50 -04:00
<td><%= friendship.created_at %></td>
<td><%= friendship.updated_at %></td>
2014-10-27 11:06:31 -04:00
<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 %>