I want to choose from a collection, i tried the code below, but it render only the values and the levels of AttributeType not the collection of check_boxes containing these values.
my form_file:
<%= simple_form_for @rule do |f| %>
<%= f.input :id ,class:"form-control form-control-lg",placeholder: 'The id of your rule' %>
<p class="control">
<%= f.collection_check_boxes :at_suj, AttributeType.all, :value, :level do |m| %>
<%= m.label class: 'checkbox' do %>
<%= m.check_box class: 'checkbox' %>
<%= m.text %>
<% end %>
<% end %>
</p>
</div>
<div class="actions">
<%= f.button :submit, class:"btn btn-success btn-rounded ",title:"cliquer pour créer cette règle" %>
<% end %>
where is the problem!
Aucun commentaire:
Enregistrer un commentaire