0
僅當滿足特定條件時纔可以顯示錶單字段嗎?軌道中的表單中的隱藏/條件字段
我要讓類似:
<%= f.input :pregnancies, :as => :radio, :label => "Pregnancies", :collection => [["no", false], ["yes", true]]%>
if :pregnancies = true
then show this input
<%= f.input :preg_nr, :label => "Number of pregnancies" %>
在此先感謝
這是最好的總結,而不是提供* *僅一個鏈接:) – 2012-07-08 18:32:17