Is there any way in a Rails STI situation to throw an error when the base class is Instantiated? Overriding initialize will do it but then that gets trickled down to the sub
I often prefer to simply make the new class method private with:
class Base
private_class_method :new
end
This way accidental instantiation of the Base class triggers an error, but it's still possible to instantiate it with Base.send(:new) to write tests for the Base class.