You should use the appropriate constructor based on the subclass you want to create, instead of calling the constructor of the superclass and manually assigning the type. Let ActiveRecord do it for you:
# in controller def create
This gives you the benefits of defining different behaviors in your initialize () method or subclass callbacks. If you do not need these benefits or you plan to change the class of an object often, you may need to rethink the use of inheritance and just stick with the attribute.
source share