lundi 11 décembre 2017

How do I create a multiple item select list in Rails from database

Greetings

<%= f.collection_select :id, Organisation.order(:Company_Name), :id, :Company_Name, options = {include_blank: "Select an Organisation"}, html_options = {:onchange => 'broadcast_dropdown_change(document.getElementById("broadcast_country_id"), document.getElementById("broadcast_organisation_id"))'} %>

This is my code and its working fine but I want to be able to select multiple Organisations from the database instead of the dropdown list which only allows me one. Please help how I can improve this code to enable it to do so thank you.

Aucun commentaire:

Enregistrer un commentaire