Skip to content
Browse files

no longer uses connection (that may not be available) when determinin…

…g which adapter to use.
  • Loading branch information...
1 parent 9dcb4ad commit 6bf765d470192eb9414f68945e2bbefaa92db137 @ctm ctm committed Oct 27, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/foreigner.rb
View
4 lib/foreigner.rb
@@ -14,8 +14,8 @@ module ConnectionAdapters
end
Base.class_eval do
- if %w(MySQL PostgreSQL).include? connection.adapter_name
+ if %w(MySQL PostgreSQL).include? connection_pool.spec.config[:adapter]
require "foreigner/connection_adapters/#{connection.adapter_name.downcase}_adapter"
end
end
-end
+end

0 comments on commit 6bf765d

Please sign in to comment.
Something went wrong with that request. Please try again.