I have a StockCode model that can morph to different types of stockcodeables such as PaperBag, MeshBag, etc, which each have their own additonal stockcode information.
Each stockcodeable has their own form. The form will create a StockCode and it’s specific stockcodeable.
What is the best way to go about:
- Listing all StockCodes in one table, allowing you to filter by stockcodeable.
- Allowing creation of any stockcodeable from the table and have it load that specific stockcodeable’s form.
- Clicking on a StockCode in the table and have it bring you to that specific stockcodeable’s edit form.
Additional: Does a 1-1 polymorphic relationship even make sense here? Maybe I need to approach this problem differently.
Thanks.