nested forms - rails simple_nested_form_for fields_for wrong number of arguments -



nested forms - rails simple_nested_form_for fields_for wrong number of arguments -

so i'm building form in rails 3.1, using

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

but line in partial causing problem:

<h2>badges</h2> <ul id="certifications"> // next line raising error "wrong number of arguments (4 3)" <%= f.fields_for :certifications |certification_form| %> <%= render :partial => 'certification', :locals => { :f => certification_form } %> <% end %> </ul> <%= f.link_to_add "add badge", :certifications %>

so here model:

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

the controller using inherited resource gem.

what's wrong? help.

i having same problem until realized gem out of date version on git. manually updated gem files ones on git , problem fixed!

ruby-on-rails nested-forms nested-attributes actionview simple-form

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -