Hi,
In general I tend to stay away from single table inheritance in Rails due to how it is implemented at the database level, but I’m not sure if I have a viable use case or not.
I am working on a match making app, whereby a user can be a suggestion, match, or friend of another user.
A suggestion can become a match if both users like each other (therefore suggestions have an additional vote attribute and matches have an addition chat_room_id attribute). A friend is a special type of relationship which prevents people from being suggested if they are already friends, so you can’t transition from friend to a suggestion or match.
Currently I am modelling this using a Relationship abstract class, with 3 subclasses: Friendship, Suggesting and Matching.
Doe people feel this is a good approach or would you choose another solution like a polymorphic association?
Spencer