revised rdoc of class_of_active_record_descendant

This commit is contained in:
Xavier Noria
2009-01-15 01:01:59 +01:00
parent deb597d63d
commit ed847ad4e6

View File

@@ -2180,7 +2180,8 @@ module ActiveRecord #:nodoc:
end
end
# Returns the class descending directly from Active Record in the inheritance hierarchy.
# Returns the class descending directly from ActiveRecord::Base or an
# abstract class, if any, in the inheritance hierarchy.
def class_of_active_record_descendant(klass)
if klass.superclass == Base || klass.superclass.abstract_class?
klass