I am programming an e-commerce type web app (not exactly, but to give you an idea). I will be displaying different types of products that have little to do with one another, but I would like to have a Product parent class, to have a common view for all the subclasses, and share some fields and behaviours.
But this raises many questions to me, specially regarding to ActiveModel: Product shouldnt have its own table, but I would want some fields in its subclasses (hotel, restaurant, etc) to inherit those fields from it. How would I go about that?
Another reason to have a Product parent class would be that eventually I will need to use Product.all and different scopes of the class objects.
Maybe I am totally misguided, so feel free to suggest any way to do this. Maybe using a module?