是否可以仅在满足特定条件时才显示表单域?
我想做类似的东西:
<%= 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" %>
提前致谢