aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
diff options
context:
space:
mode:
authorKen Collins <ken@metaskills.net>2011-06-10 13:15:58 -0400
committerKen Collins <ken@metaskills.net>2011-06-10 13:15:58 -0400
commitc791e2d034f2fefe5bbb7eb0cae1899ed2a00184 (patch)
tree000a8431a7cf149df737ec9117b35d200fb802f0 /activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
parent8eb2b519f267e61edcf1e715489c3c9ac0244d81 (diff)
downloadrails-c791e2d034f2fefe5bbb7eb0cae1899ed2a00184.tar.gz
rails-c791e2d034f2fefe5bbb7eb0cae1899ed2a00184.tar.bz2
rails-c791e2d034f2fefe5bbb7eb0cae1899ed2a00184.zip
Allow the connection pool's #table_exists? method to give the connections #table_exists? method a chance.
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
index 8ffd40f7e5..dd1d2d4fba 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
@@ -119,6 +119,7 @@ module ActiveRecord
with_connection do |conn|
conn.tables.each { |table| @tables[table] = true }
+ @tables[name] = true if !@tables.key?(name) && conn.table_exists?(name)
end
@tables.key? name