search for: options_array

Displaying 1 result from an estimated 1 matches for "options_array".

2006 Jun 04
5
Creating pulldowns using loops
...d pulldowns in PHP is simple so I can''t figure out why it seems to elude me in RoR. I want to create a simple pulldown list with the options and values "1" through "14." I have been trying to accomplish this with the .upto method like so: --START RHTML CODE-- <% options_array = [ 1.upto(14) {|i| print "[" i "," i "]"} ] %> <%= select(''radical'', ''strokes'', options_array) %> --END CODE-- I have tried variations of parenthesis and quotations to no avail. At best, I can generate [1,1] but nothin...