提交 2470392e 编写于 作者: S Sebastian Martinez

Add doc to #attribute_names

上级 d043d653
......@@ -767,6 +767,9 @@ def attribute_method?(attribute)
super || (table_exists? && column_names.include?(attribute.to_s.sub(/=$/, '')))
end
# Returns an array of column names as strings if it's not
# an abstract class and table exists.
# Otherwise it returns an empty array.
def attribute_names
@attribute_names ||= if !abstract_class? && table_exists?
column_names
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册