Mark Dixon
2009-Jul-28 10:57 UTC
''double'' nest form fields with accepts_nested_attributes_for
Hi Is it possible to ''double'' nest form fields with accepts_nested_attributes_for? Something like: [code=ruby]<% form_for parent do |parent_form| %> <% parent_form.fields_for parent_children do |parent_children_fields| %> ... <% parent_children_fields.fields_for parent_child_activities do | parent_child_activities_fields| %> ...[/code] Rough example but should be enough for demonstration. What I''m trying to do is form a many to many join between parent and child while simultaneously creating a join to their activities. A parent has many children. A child has many parents. Parents and children together have many activities. If this would be possible it would be a wonderful thing, though it depends on creation of the first level join before the second. Anyone have experience of this? -- Posted via http://www.ruby-forum.com/.
Maybe Matching Threads
- accepts_nested_attributes_for and fields_for not working!
- accepts_nested_attributes_for :reject_if issue
- accepts_nested_attributes_for with has_many => :through
- nested_form gem don't work for accepts_nested_attributes_for :limit
- has_one accepts_nested_attributes_for fields_for NOT WORKING HELP