aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Neves <arthurnn@gmail.com>2013-09-09 13:47:07 -0400
committerArthur Neves <arthurnn@gmail.com>2013-09-09 13:47:07 -0400
commitf0301e3de6e6ee394af0b120d05290f984338382 (patch)
treedc7655764f570833904bbd1188e89c0dbd015997
parent59a35610459da7368e79179c9d33bc6e4697adb1 (diff)
downloadrails-f0301e3de6e6ee394af0b120d05290f984338382.tar.gz
rails-f0301e3de6e6ee394af0b120d05290f984338382.tar.bz2
rails-f0301e3de6e6ee394af0b120d05290f984338382.zip
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