Changing type of ActiveRecord Class in Rails with Single Table Inheritance

Viewed 17455

I have two types of classes:

BaseUser < ActiveRecord::Base 

and

User < BaseUser

which acts_as_authentic using Authlogic's authentication system. This inheritance is implemented using Single Table Inheritance

If a new user registers, I register him as a User. However, if I already have a BaseUser with the same email, I'd like to change that BaseUser to a User in the database without simply copying all the data over to the User from the BaseUser and creating a new User (i.e. with a new id). Is this possible? Thanks.

3 Answers
Related