lundi 18 septembre 2017

Add multiple suggestion values in select ruby on rails

<%= f.select :id,
                 lists..collect{|p| [p.name, p.id]} << "add product" ,
                 {prompt:t("select product")}, {:class => "selectpicker"}
    %>

The problem is that add product has added on the last index but i want on second index

Aucun commentaire:

Enregistrer un commentaire