Multiple models in a single form


I had a question and I wanted your opinions.

If I have a form that has input data that needs to go in more than 1 table.

Should I have a model for each portion that belongs to their specific tables?


Product and Product Description.

So I guess I would pass two models, $model and $model_description and have seperate validations for each.

Or is there a preferable other way in doing this?


This cookbook can give you some idea -

This forum post too -

Thank you for your answer, the way I am doing right now is im using a Form Model to validate my inputs and then using the appropriate active record models to save.

I am always open to suggestions.

I will look at what you’ve posted thanks!