Ruby on rails 如何在块的表单_中生成单选按钮表单?
我知道如何使用以下命令循环组合框:Ruby on rails 如何在块的表单_中生成单选按钮表单?,ruby-on-rails,ruby,Ruby On Rails,Ruby,我知道如何使用以下命令循环组合框: <%= f.collection_select(:category_id , Category.all, :id, :name, {:prompt => false})%> 但是如何在表单助手中执行此操作?谢谢。没有 <%= f.radio_button :receive_newsletter, "yes" %> 工作?不行 <%= f.radio_button :receive_newsletter, "yes"
<%= f.collection_select(:category_id , Category.all, :id, :name, {:prompt => false})%>
但是如何在表单助手中执行此操作?谢谢。没有
<%= f.radio_button :receive_newsletter, "yes" %>
工作?不行
<%= f.radio_button :receive_newsletter, "yes" %>
工作