Creating a nested model form

Posted by Elliot on Stack Overflow See other posts from Stack Overflow or by Elliot
Published on 2011-01-02T17:56:40Z Indexed on 2011/01/02 23:53 UTC
Read the original article Hit count: 391

Hey Guys,

I'm trying to build a multi model form - but one of the issues, is I need to link the models within the form.

For example, lets say the form I have has the following models: Users, Profiles

When creating a new user, I'd like to create a new profile simultaneously, and then link the two. The issue is, if neither have been created yet, they don't have ID's yet - so how can I assign linking values?

Thanks!

-Elliot

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about ruby