vendredi 25 septembre 2015

Rail checkbox with bootstrap buttons

I am trying to use bootstrap buttons(http://ift.tt/18ZqgzV) for my checkboxes where users has to select one or many of the options. each check box is a boolean column. But with this code, when i click on the buttons, the check boxes doesn't get selected, neither does the state change.

  <div class="btn-group btn-group-justified" data-toggle="buttons">

    <%= f.label :tdm, class: "btn btn-primary" do %>
      <%= f.check_box :tdm%>
      beginner
    <% end %>


    <%= f.label :Domination, class: "btn btn-primary" do %>
      <%= f.check_box :casual%>
      casual
    <% end %>

    <%= f.label :ctf, class: "btn btn-primary" do %>
      <%= f.check_box :ctf%>
      competitive
    <% end %>

    <%= f.label :demolition, class: "btn btn-primary" do %>
      <%= f.check_box :demolition%>
      competitive
    <% end %>
  </div>

what I'm trying to accomplish http://ift.tt/1KVhHcs




Aucun commentaire:

Enregistrer un commentaire