0
我90%肯定,我做的事情顯然是錯誤的位置,但是當我使用的是選擇一個集合:選擇選項不formtastic現場使用收集驗證之後預選
<%= f.input :description,
:label => "Which best describes who you are?",
:prompt => "Select an option...",
:collection => [[ "I am working for a company", "working"],["I am a freelancer", "freelancer"],["I am studying", "studying"],["I have recently graduated", "graduated"],["I teach", "teach"],["None of these things","none"]]
%>
和表單未通過驗證,即使已保存並按預期方式將其傳遞到params [:user] [:description],也不會選擇先前選擇的值。任何想法,我要去錯了嗎?
哦!感謝那。 – Daniel
對不起,這沒有什麼區別:價值沒有預先選擇重新加載 – Daniel
已更新取決於formtastic文檔 – MikeZ