提交 eba58184 编写于 作者: J Jon Leighton

Fix the build on postgres. Note: we should probably actually make schema mutations bust the cache.

上级 7b1eeea5
......@@ -72,7 +72,7 @@ def get_primary_key(base_name) #:nodoc:
when :table_name_with_underscore
base_name.foreign_key
else
if ActiveRecord::Base != self && table_name
if ActiveRecord::Base != self && table_exists?
connection.schema_cache.primary_keys[table_name]
else
'id'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册