diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-06-17 00:02:45 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-06-17 00:02:45 -0700 |
commit | ba1b88fda6304f4e881a5b286fdb290c8477f155 (patch) | |
tree | 6f8b4faf3832083ea3f16539c9c8c5238938bd98 /activerecord/lib/active_record/connection_adapters/abstract | |
parent | da25aa5841befacbe77cc44b8370ead8b5d3207b (diff) | |
parent | c791e2d034f2fefe5bbb7eb0cae1899ed2a00184 (diff) | |
download | rails-ba1b88fda6304f4e881a5b286fdb290c8477f155.tar.gz rails-ba1b88fda6304f4e881a5b286fdb290c8477f155.tar.bz2 rails-ba1b88fda6304f4e881a5b286fdb290c8477f155.zip |
Merge pull request #1636 from metaskills/upstream/3-1-stable
Allow the connection pool's #table_exists? method to give the connections
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb | 1 |
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 |