0

我尝试:

= form_for @question do |w|
  %p
    = w.select "question_status"
    %option{:value => 1}= "label 1"
    %option{:value => 2}= "label 2"

但得到:参数数量错误(1 对 2)

4

1 回答 1

0
= form_for @question do |w|
  %p
    = w.select 'question_status', [['label 1', 1], ['label 2', 2]]
于 2013-06-06T09:44:13.443 回答