Pregunta

I need a simple_form that has options 1-10. I was trying the following:

 <%= f.collection_radio_buttons :cost, [1..10] %>
¿Fue útil?

Solución

Suppose this would work as well.

<%= f.input :cost, collection: (1..10), as: :radio_buttons, boolean_style: :inline %>

Otros consejos

So easy:

 <%= f.input :cost, collection: [1,2,3,4,5,6,7,8,9,10], as: :radio_buttons, boolean_style: :inline %>
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top