I'm trying to add checkboxes to my form but the bootstrap class "checkbox-inline" does not seem to be working for me.
Here is the code:
<strong>Styles:</strong>
<%= f.collection_check_boxes :style_ids, Style.all, :id, :name do |cb| %>
<% cb.label(class: "checkbox-inline input_checkbox") {cb.check_box(class: "checkbox") + cb.text} %>
<% end %>
<br><br>
<strong>Ingredients:</strong>
<%= f.collection_check_boxes :ingredient_ids, Ingredient.all, :id, :name do |cbi| %>
<% cbi.label(class: "checkbox-inline input_checkbox") {cbi.check_box(class: "checkbox") + cbi.text} %>
<% end %>
And here is the outcome:
Any help on this would be much appriciated, been pulling my hair out over this.
Aucun commentaire:
Enregistrer un commentaire