Add row number to table of guests

This commit is contained in:
Manuel Bustillo 2024-07-11 20:14:23 +02:00
parent 946cd959e2
commit a0119ad0cc

View File

@ -5,13 +5,15 @@
<div id="guests"> <div id="guests">
<table> <table>
<tr> <tr>
<th>Row #</th>
<th>Name</th> <th>Name</th>
<th>Email</th> <th>Email</th>
<th>Phone</th> <th>Phone</th>
<th colspan="2"></th> <th colspan="2"></th>
</tr> </tr>
<% @guests.each do |guest| %> <% @guests.each_with_index do |guest, i| %>
<tr> <tr>
<td><%= i + 1 %></td>
<td><%= guest.full_name %></td> <td><%= guest.full_name %></td>
<td><%= guest.email %></td> <td><%= guest.email %></td>
<td><%= guest.phone %></td> <td><%= guest.phone %></td>