From a0119ad0cc1dd7c27682bc17964277bb97d98723 Mon Sep 17 00:00:00 2001 From: Manuel Bustillo Date: Thu, 11 Jul 2024 20:14:23 +0200 Subject: [PATCH] Add row number to table of guests --- app/views/guests/index.html.erb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/guests/index.html.erb b/app/views/guests/index.html.erb index 52d4380..a498755 100644 --- a/app/views/guests/index.html.erb +++ b/app/views/guests/index.html.erb @@ -5,13 +5,15 @@
+ - <% @guests.each do |guest| %> + <% @guests.each_with_index do |guest, i| %> +
Row # Name Email Phone
<%= i + 1 %> <%= guest.full_name %> <%= guest.email %> <%= guest.phone %>