This question already has an answer here:
I have an array with categories. How to put elements of array into dropdown list?
<% array = ["W", "H", ..]%> <%= f.select :type, ['Work', 'Home', 'Other'], :prompt => 'Select type' %>
Aucun commentaire:
Enregistrer un commentaire