Should fields_for for has_many association execute block even if the collection is empty?


I had a problem where fields_for block was executed once, even if the
association collection was empty - child_form.object was nil of
course. Adding accepts_nested_attributes to parent model solved the
problem - block is now executed correctly for each instance of the

Is this proper behavior or a bug? I’m using Rails 2.3.4


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs