diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-12-16 13:07:10 +0000 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2011-12-16 13:52:07 +0000 |
commit | 7f20bb995aa34c6c6869543209595ff811e9dbc3 (patch) | |
tree | 1ba6255c6dd0f6326d0535497b111dcdbfbf49d3 /activerecord/lib/active_record/attribute_methods | |
parent | dee94d8ab5b7d27653052441a3b408db380dd784 (diff) | |
download | rails-7f20bb995aa34c6c6869543209595ff811e9dbc3.tar.gz rails-7f20bb995aa34c6c6869543209595ff811e9dbc3.tar.bz2 rails-7f20bb995aa34c6c6869543209595ff811e9dbc3.zip |
Don't store defaults in the schema cache
Diffstat (limited to 'activerecord/lib/active_record/attribute_methods')
-rw-r--r-- | activerecord/lib/active_record/attribute_methods/primary_key.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/attribute_methods/primary_key.rb b/activerecord/lib/active_record/attribute_methods/primary_key.rb index e3c7344f59..f575b26d04 100644 --- a/activerecord/lib/active_record/attribute_methods/primary_key.rb +++ b/activerecord/lib/active_record/attribute_methods/primary_key.rb @@ -72,8 +72,8 @@ module ActiveRecord when :table_name_with_underscore base_name.foreign_key else - if ActiveRecord::Base != self && connection.schema_cache.table_exists?(table_name) - connection.primary_key(table_name) + if ActiveRecord::Base != self && table_name + connection.schema_cache.primary_keys[table_name] else 'id' end |