instance method
connect
Ruby on Rails 2.2.3
Since v2.2.3 Last seen in v3.0.20 PrivateSignature
connect()
No documentation comment.
Source
# File activerecord/lib/active_record/connection_adapters/mysql_adapter.rb, line 537
def connect
encoding = @config[:encoding]
if encoding
@connection.options(Mysql::SET_CHARSET_NAME, encoding) rescue nil
end
if @config[:sslca] || @config[:sslkey]
@connection.ssl_set(@config[:sslkey], @config[:sslcert], @config[:sslca], @config[:sslcapath], @config[:sslcipher])
end
@connection.real_connect(*@connection_options)
# reconnect must be set after real_connect is called, because real_connect sets it to false internally
@connection.reconnect = !!@config[:reconnect] if @connection.respond_to?(:reconnect=)
configure_connection
end
Defined in activerecord/lib/active_record/connection_adapters/mysql_adapter.rb line 537
· View on GitHub
· Improve this page
· Find usages on GitHub