Could you just give me a hint where I have to look on to implement a simple inheritance based on a attribute. To keep things simple, lets say I want to have a SimpleProject and ComplexProject and the inheritance attribute would be a type.
What is more interesting:
SimpleProject has a value attribute which is just a String.
ComplexProject has a value attribute which is a hash and serialized to JSON.
So then if I want to fetch projects: projects.to_a
it will return me instances of SimpleProject or ComplexProject based on the type attribute.
Do I need to implement that by hand using a map method inside users reposioty or ROM provides any predefined methods for that or at least guidelines how to do it in the most efficient way?
PS.
I am new to the ROM, I used DataMapper even before diving in to the Rails and ActiveRecord.
Now ROM seems to be a really production ready solution.