提交 ed847ad4 编写于 作者: X Xavier Noria

revised rdoc of class_of_active_record_descendant

上级 deb597d6
......@@ -2180,7 +2180,8 @@ def compute_type(type_name)
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册