Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

in Rails 3.1.rc1 wrong number of arguments (4 for 3) occured #48

Closed
thaniyarasu opened this issue May 29, 2011 · 1 comment
Closed

in Rails 3.1.rc1 wrong number of arguments (4 for 3) occured #48

thaniyarasu opened this issue May 29, 2011 · 1 comment

Comments

@thaniyarasu
Copy link

here is the correct one

module NestedForm
class Builder

def fields_for_with_nested_attributes(association_name, association, options, block)
  block ||= Proc.new { |fields| @template.render(:partial => "#{association_name.to_s.singularize}_fields", :locals => {:f => fields}) }
  @fields ||= {}
  @fields[association_name] = block
  super(association_name, association, options, block)
end

end
end

@ryanb
Copy link
Owner

ryanb commented May 30, 2011

This is a duplicate of #42. Closing.

@ryanb ryanb closed this as completed May 30, 2011
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants