To permanently change the type, change the value of the type column.
c1 = Car.first c1.name # BMW c1.update_attribute(:type, "Bus") b1 = Bus.first b1.name # BMW
To also change the type of an object in memory without reloading it from the database, use "becomes, as in
c1 = c1.becomes(Bus)
source share