second attempt of making favorite people view sortable

This commit is contained in:
Pfingstfrosch
2020-05-16 14:09:33 +02:00
parent f2686288b7
commit 2f6d638cd1
3 changed files with 25 additions and 4 deletions
+7 -3
View File
@@ -27,9 +27,10 @@
<table>
<tr>
<th>Thumb</th>
<th><%= link_to "First Name", :sort => "first_name" %></th>
<th><%= link_to "Last Name", :sort => "last_name" %></th>
<th><%= link_to "Registration Date", :sort => "created_at" %></th>
<th><%= sortable "First Name", "first_name" %></th>
<th><%= sortable "Last Name", "last_name" %></th>
<th><%= sortable "Registration Date", "created_at" %></th>
<th>Del</th>
</tr>
<% for person in @favorite_people %>
<tr>
@@ -51,6 +52,9 @@
<td>
<%= person['created_at'] %>
</td>
<td>
<%= link_to "X", {:action => "delete_person", :tiss_id => person['tiss_id']}, :method => 'delete' %>
</td>
</tr>
<% end %>
</table>