2013-08-18 26 views

回答

8

嘗試了這一點

<%= f.input :country, as: :country %> 
+0

如果我可以添加一個小小的備註:你不需要'as::country'參數,因爲名稱中包含'country'的屬性會自動映射到國家/地區選擇。請參閱[文檔](https://github.com/plataformatec/simple_form#available-input-types-and-defaults-for-each-column-type) –

相關問題