this should work:
f.select(:heat_level, @formlist.map { |value| [ value, value ] })
some explanation:
form select can handle both hash-like and massive options. Meaning, both { 1 => "1", 2 => "2", 3 => "3", 4 => "4", 5 => "5"}
and
[[1, 1], [2, 2], [3, 3], [4, 4], [5, 5]]
will work.
@formlist.map { |value| [ value, value ] } @formlist.map { |value| [ value, value ] } does the last
source share