2011-01-08 196 views

回答

21

只需在您的select_tag一個:include_blank => 'All People'選項:

<%= select_tag "people", options_from_collection_for_select(@people, "id", "name"), :include_blank => 'All People' %> 
+2

`:include_blank =>「All people」`生成以下代碼:``。也許他們改變了語法或什麼? – imjp 2011-07-16 21:15:39

相關問題