app/views/option_types/_index.html.erb
<div class="box">
<div class="box-header">
<h3 class="box-title">Option Types</h3>
<div class="box-tools pull-right">
<div class="btn-group">
<%= link_to "Add Option Type", new_product_option_type_path(product), class: "btn btn-primary" %>
</div>
</div>
</div>
<div class="box-body">
<div class="">
<table class="table" id="option_types-table" >
<thead>
<tr>
<th> Name </th>
<th> Values </th>
</tr>
</thead>
<tbody>
<% option_types.each do |option_type| %>
<tr>
<td><%= link_to option_type.name, option_type %></td>
<td>
<%= option_type.option_values.pluck('name').join(', ') %>
</td>
</tr>
<% end %>
</tbody>
</table>
</div>
</div>
</div>