2013-06-06 29 views
0

我想:haml。下拉里阿斯中的form_for

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

,但得到:錯誤的參數數目(1 2)[HAML的

+0

可能重複。形式\ _for。 dropdowsn list](http://stackoverflow.com/questions/16956429/haml-form-for-dropdowsn-list) – matt

回答

0
= form_for @question do |w| 
    %p 
    = w.select 'question_status', [['label 1', 1], ['label 2', 2]] 
+0

спасибобольшое:) –