Open ghost opened 8 years ago
Following this tutorial https://www.youtube.com/watch?v=c2qwV0B9yfU from Ryan Bates. I implemented HABTM Checkboxes. The problem is that i can't get it working with best_in_place gem. I've tried 300 different ways and none work.
<div class="field"> <%= hidden_field_tag 'order[category_ids][]', nil %> <% Category.all.each do |category| %> <%= check_box_tag 'order[category_ids][]', category.id, @order.category_ids.include?(category.id), id: dom_id(category) %> <%= label_tag dom_id(category), category.name %><br> <% end %> </div>
If you could help me turning this into best_in_place I would much appreciate it.
Following this tutorial https://www.youtube.com/watch?v=c2qwV0B9yfU from Ryan Bates. I implemented HABTM Checkboxes. The problem is that i can't get it working with best_in_place gem. I've tried 300 different ways and none work.
If you could help me turning this into best_in_place I would much appreciate it.