提交 4c33d517 编写于 作者: J Jon Leighton

#id is an alias for whatever the primary key is

上级 40840aa9
......@@ -5,7 +5,7 @@ module PrimaryKey
# Returns this record's primary key value wrapped in an Array if one is available
def to_key
key = send(self.class.primary_key)
key = self.id
[key] if key
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册