Created
August 10, 2010 20:29
-
-
Save brianmario/517936 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb | |
| index ba0051d..ef4b90f 100644 | |
| --- a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb | |
| +++ b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb | |
| @@ -7,6 +7,8 @@ module ActiveRecord | |
| class Base | |
| # Establishes a connection to the database that's used by all Active Record objects. | |
| def self.mysql_connection(config) # :nodoc: | |
| + return ActiveRecord::Base.mysql2_connection(config) if defined? ::Mysql2 | |
| + | |
| config = config.symbolize_keys | |
| host = config[:host] | |
| port = config[:port] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment