How to cast an ActiveRecord object to another class when using STI?

fotanus picture fotanus · Aug 6, 2010 · Viewed 19.2k times · Source

I'm currently using ActiveRecord single table inheritance.

How can I cast one of my models from type A to B? They have the same parent.

Answer