pieter michels

Github    Ask me anything   

January 25, 2011 at 8:37am

Home

Rails 3 and Nested Forms

When developing nested forms in Rails you need to tell each model what their relation is with other models, like this:

What I didn’t know is that you also need to manually declare the attributes relation to accessible, when you are already using attr_accessible in the related model(s). (Thanks dixis for the comment).

Read more about it here: http://www.notesfromthecloud.com/2010/05/acceptsnestedattributesfor-and.html

Notes

  1. pieterm posted this