Let's say I have two types of users, A
and B
. Users of type B
have fewer privileges and less-strict validations on fields (more can be blank). Otherwise, they're basically the same as type A
. This fact makes me inclined to use single table inheritance.
Here's my concern - type B
users can upgrade to type A
. When they upgrade, they should keep all their associated records. Is there an easy way to convert from one model type to another using STI such that all associations are preserved? Can you give a simple example?