aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2013-09-10 07:14:52 -0700
committerSantiago Pastorino <santiago@wyeworks.com>2013-09-10 07:14:52 -0700
commit143e00954619f3ce86e08f72ba7927c6f8991062 (patch)
treedc7655764f570833904bbd1188e89c0dbd015997
parent59a35610459da7368e79179c9d33bc6e4697adb1 (diff)
parentf0301e3de6e6ee394af0b120d05290f984338382 (diff)
downloadrails-143e00954619f3ce86e08f72ba7927c6f8991062.tar.gz
rails-143e00954619f3ce86e08f72ba7927c6f8991062.tar.bz2
rails-143e00954619f3ce86e08f72ba7927c6f8991062.zip
Merge pull request #12176 from arthurnn/ar32_schema_cache
on SchemaCache use the connection getter instead of the obj given
-rw-r--r--activerecord/lib/active_record/connection_adapters/schema_cache.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/schema_cache.rb b/activerecord/lib/active_record/connection_adapters/schema_cache.rb
index bc8d24a03f..9fc218d815 100644
--- a/activerecord/lib/active_record/connection_adapters/schema_cache.rb
+++ b/activerecord/lib/active_record/connection_adapters/schema_cache.rb
@@ -9,7 +9,7 @@ module ActiveRecord
@tables = {}
@columns = Hash.new do |h, table_name|
- h[table_name] = conn.columns(table_name, "#{table_name} Columns")
+ h[table_name] = connection.columns(table_name, "#{table_name} Columns")
end
@columns_hash = Hash.new do |h, table_name|
@@ -19,7 +19,7 @@ module ActiveRecord
end
@primary_keys = Hash.new do |h, table_name|
- h[table_name] = table_exists?(table_name) ? conn.primary_key(table_name) : nil
+ h[table_name] = table_exists?(table_name) ? connection.primary_key(table_name) : nil
end
end