I have 3 propositions i want my user to be able to choose from : Rent, sell or sublet, with simple form collection checkboxes and print the selection into the database.
I did try the following code but it doesn't print anything.
<%= simple_form_for @annonce do |f| %>
<%= f.collection_check_boxes :Type_de_projet, [["Rent", 'Rent'], ["Sell", 'Sell']], :first, :last %>
<%= f.submit "Créer une annonce ", :class => 'btn btn-outline-primary'%>
Aucun commentaire:
Enregistrer un commentaire