mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Fix the build on postgres. Note: we should probably actually make schema mutations bust the cache.
This commit is contained in:
@@ -72,7 +72,7 @@ module ActiveRecord
|
||||
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'
|
||||
|
||||
Reference in New Issue
Block a user