I have the following select box in my form:
Related Type: <%= f.select(:TYPE, [[\'Type A\', \'Type A\'], [\'T
HTML
<%= form.select(:product_ids, Product.all.collect {|p| [ p.name, p.id ] }, { :prompt => "Please select"}, { :multiple => true, :size => 5 }) %>
Controller
@category = Category.new(category_params) def category_params params.require(:category).permit(:name, product_ids: []) end