提交 fe78e1da 编写于 作者: S Steve Klabnik

Better docs for overriding inheretance column

上级 7e538e81
...@@ -108,12 +108,9 @@ def abstract_class? ...@@ -108,12 +108,9 @@ def abstract_class?
# The default inheritance column name is +type+, which means it's a # The default inheritance column name is +type+, which means it's a
# reserved word inside Active Record. To be able to use single-table # reserved word inside Active Record. To be able to use single-table
# inheritance with another column name, or to use the column +type+ in # inheritance with another column name, or to use the column +type+ in
# your own model for something else, you can override this method to # your own model for something else, you can set +inheritance_column+:
# return a different name:
# #
# def self.inheritance_column # self.inheritance_column = 'zoink'
# 'zoink'
# end
def inheritance_column def inheritance_column
'type' 'type'
end end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册