If I understand you correctly, it looks like you want wizard (or multi-step) form during the user registration process that populates the user data into multiple models/database tables.
I think that the easiest way I would build this multi-step registration form is in two steps.
1. Make a form to store all your data properly
You’re going to want to make a larger single form that can accept all the data you’re asking the user for and store it properly in the database across all 3 models.
The default rails way to make a complex form like this is through nesting your form and adding
accepts_nested_attributes_for in your appropriate models. More often than not, this method leads to a lot of unnecessary complexity and non-descriptive errors.
I would (and I think the thoughtbot crew would too) recommend making a “Form Object” instead for a very clean way to store all the data you want from your user.
The weekly iteration video linked above will definitely help you make that form, but if you need other references I recommend “ActiveModel Form Objects” from the thoughtbot blog or “#416 Form Objects” from RailsCasts.
2. Split the form up into a wizard
Once you have a single Form Object that can collect and store the user’s information properly, the next step is to break this form up into a multi-step form, or a “wizard”.
There is a popular gem named
wicked which helps developers break up their large forms into wizards. The README on github has many links to help you get started.
You can make a wizard yourself if you’re up to the challenge, but I think using
wicked will be your fastest option.
Let me know if this helps,