我有以下select()
表单辅助方法:
select("treatment", "frequency_unit", { "hour" => "hour", "day" => "day", "week" => "week", "month" => "month", "year" => "year" })
帮助者看似随机地组织选择......我希望它保持选择的顺序,因为我在上面列出了它们。
我怎样才能做到这一点?
这是上面代码的输出:
<select id="treatment_frequency_unit" name="treatment[frequency_unit]">
<option value="month">month</option>
<option value="week">week</option>
<option value="hour">hour</option>
<option value="day">day</option>
<option value="year">year</option>
</select>