Reputation: 48453
I have a form for the registration of new users. In the form are these inputs:
All fields are required. The first 3 fields are in model_a and the last two in model_b. In both models I have already prepared validation rules.
It should work this way: User make registration and into the table model_a will be saved first 3 fields, into the table model_b last two fields.
But how to set up the form this way?
Upvotes: 1
Views: 451
Reputation: 2635
Take a look at Nested forms
http://railscasts.com/episodes/196-nested-model-form-part-1
Upvotes: 1