form model that represents two active record models


When you need to have a form that modifies an active record, you use the active record as the model and pass it to the view.

In my application, I need to modify more than one active records (in the same form).

What is the preferred way to do this?


I usually pass 2 models to my view :). In controller you can validate them both, and if both are ok then save.

try to help…

did you have seen this??

My link

Thank you both for the fast and great answer :slight_smile: