I’m trying to dynamically show a table that looks like:
The table doesn’t format in the way I would expect when trying to show the additional row if there is more than 1 speaker under the details header. I tried adding another table within the <tr>
like this:
<tbody>
<%= for meeting <- @meetings.results do %>
<tr>
<td><%= meeting.date %></td>
<table> # nested table
<%= for speaker <- meeting.speakers do %>
<tr>
<td>
<h4><%= speaker.name %></h4>
</td>
</tr>
<tr>
<td>
<p><%= speaker.title %></p>
</td>
</tr>
<% end %>
</table> # end nested table
<td><%= link "Attendees", to: meeting_path(@conn, :show, meeting) %></td>
</tr>
<% end %>
</tbody>
How would I accomplish this or is there another way I should show the data?