My loop:
<% @products.first.attributes.except('name', 'created_at','updated_at','id').each do |attr_name, attr_value| %>
<tr>
<td><span><%= t(attr_name) %></span></td>
<td class="middle">Pr. x</td>
<%= @products.each do |f| %>
<td class="last"><%= f.attr_name %> ,-</td>
<% end %>
<tr>
<% end %>
Then I get this error: undefined method attr_name for #<Product:0x3adc850
How do I use the column method with attr_name? I have tried things like f."#{attr_name}"
without luck.