Greetings! I am a beginner in the world of Rails and could really use some assistance.
Below is the table data extracted from index.html.erb:
<table class="table">
<thead>
<tr>
<th>Area</th>
<th>Item</th>
<th>Year</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<%@a1s.each do |ada| %>
<tr>
<td><%=ada.Area%></td>
<td><%=ada.Item%></td>
<td><%=ada.Year%></td>
<td><%=ada.Value%></td>
</tr>
<%end%>
</tbody>
</table>
I am looking for guidance on how to transform the index.html.erb table into the example converted table below:
- Convert year data as headers and display their respective values.
- Show Item and Area names once, followed by the next country in the subsequent row.