This method is deprecated or moved on the latest stable version.
The last existing version (v3.2.13) is shown here.
class_of_active_record_descendant(klass)
protected
Returns the class descending directly from ActiveRecord::Base or an abstract
class, if any, in the inheritance hierarchy.
# File activerecord/lib/active_record/inheritance.rb, line 78
def class_of_active_record_descendant(klass)
if klass == Base || klass.superclass == Base || klass.superclass.abstract_class?
klass
elsif klass.superclass.nil?
raise ActiveRecordError, "#{name} doesn't belong in a hierarchy descending from ActiveRecord"
else
class_of_active_record_descendant(klass.superclass)
end
end