我在尝试:
= form_for @question do |w|
%p
= w.select "question_status"
%option{:value => 1}= "label 1"
%option{:value => 2}= "label 2"
但得到:错误的参数数量(1对2)
答案 0 :(得分:0)
= form_for @question do |w|
%p
= w.select 'question_status', [['label 1', 1], ['label 2', 2]]