rails simple_nested_form_for fields_for неправильное количество аргументов

Итак, я создаю форму в рельсах 3.1, используя

<%= simple_nested_form_for(@person, :url => collection_url, :html=>{:multipart => true}) do |f| %>
  <%= render :partial => "form", :locals => { :f => f } %>
<% end %>

, но эта строка в партиале вызывает проблему:

<h2>Badges</h2> 
<ul id="certifications">
// this following line is raising the error "wrong number of arguments (4 for 3)"
<%= f.fields_for :certifications do |certification_form| %> 
    <%= render :partial => 'certification', :locals => { :f => certification_form } %>
<% end %>
</ul>
<%= f.link_to_add "Add a Badge", :certifications %>

Итак, вот модель:

class Person < ActiveRecord::Base
  has_many :certifications, :dependent=>:destroy, :order=>:position
  has_many :certificates, :through=>:certifications
  accepts_nested_attributes_for :certifications, :allow_destroy => true
end

Контроллер использует унаследованный драгоценный камень ресурса.

Что случилось? Спасибо за помощь.

8
задан randomor 11 July 2011 в 21:17
поделиться