mercredi 24 mai 2017

Rails3 How put my arrai into f.select [duplicate]

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