I am currently working on a Rails app that uses ActiveRecord to manage products. Each product has a category and subcategory, with each subcategory defined by multiple fields within the application. This system has become quite complex and I have been considering using MongoDB and Mongomapper from the start instead.
My main question is how best to model this application in MongoDB. I was thinking of creating a product model with common fields and then having category models inherit from the product model with different unique fields.
Another challenge I am facing is allowing users to create their own categories and fields within the application. For example, if a user creates a "cars" category with fields like speed and number of doors, how can I dynamically generate a form using these new fields for future car entries?
If anyone has any ideas, pointers, or examples to help me with this problem, I would greatly appreciate it.
Thank you in advance, Rick