2012-10-17 20 views
0

我正在使用單選按鈕來顯示記錄的集合,但在這裏,我希望當集合等於一個比我想隱藏單選按鈕.. 在這裏, m使用單選按鈕只顯示集合是否大於1,欄杆

-if collection.count > 1 
    = t.input :sibling_parent, :as => :radio, :collection => @sibling_parents_drop, :input_html => {:class=>"ml", :checked => 'checked'} 
-else 
    %h2 
    field without radio button 

但它不適合我。請幫助!

回答

0

- if @sibling_parents_drop.count > 1

+0

謝謝你的幫助achempion你的幫助。它爲我工作 –