Select Box population


#1

I would like to populate a select box in rails with the values 0 - 100 -
how can this be done in rails?


#2

Mike wrote:

I would like to populate a select box in rails with the values 0 - 100 -
how can this be done in rails?

any ideas anyone?


#3

I would like to populate a select box in rails with the values 0 - 100 -
how can this be done in rails?

any ideas anyone?

<% 1.upto(100) do |i| %>

<%= i %> <% end %>

Justin


#4

Also,

<%= select_tag(“value”, options_for_select((0…100).map { |v| [v.to_s,
v] })) %>


#5

thanks a lot guys - very helpful!