Topic: Form for Single Table Inheritance
Hello all, I'm building a restaurant menu with various product, some of which have a particular behaviors: adding or removing ingredients. I'm thinking of using STI to modelize it.
The problem is with the form, I can't decide if it is better to construct two different _form partials, or only one.
Actually the fields differ for only one, but it a bit complex because it's a list of ingredients from which choose.
In case of single _form, I'm thinking of load the list asynchronously...
Routes should be the same for every models, so in case of two _form, I'm thinking of a first select box to choose, and then render the correct one. The variable will be on the query string for faster access.