<% @page_title = "all variants" %>

<h1>Listing variants</h1>

<table>
  <tr>
  <% for column in Variant.content_columns %>
    <th><%= column.human_name %></th>
  <% end %>
  </tr>
  
<% for variant in @variants %>
  <tr>
  <% for column in Variant.content_columns %>
    <td><%=h variant.send(column.name) %></td>
  <% end %>
    <td><%= link_to 'Show', :action => 'show', :id => variant %></td>
  </tr>
<% end %>
</table>

<%= link_to 'Previous page', { :page => @variant_pages.current.previous } if @variant_pages.current.previous %>
<%= link_to 'Next page', { :page => @variant_pages.current.next } if @variant_pages.current.next %> 

