nested_form给我错误的参数个数(4个为3个)

时间:2013-04-18 11:14:05

标签: ruby-on-rails nested-forms

错误的参数数量(4个为3) 提取的来源(围绕#行):

enter code here
<%= f.text_field :name %>
# <%= f.fields_for :tasks do |task_form| %>
<%= task_form.text_field :fname %>
<%= task_form.link_to_remove "Remove this task" %>
<% end %>

1 个答案:

答案 0 :(得分:0)

试试这个:

<%= f.semantic_fields_for :tasks, ModelName.new do |task_form| %>

感谢。