Class: ActiveRecord::Base
- Inherits:
-
Object
- Object
- ActiveRecord::Base
- Defined in:
- lib/active_record/connection_adapters/dbslayer_adapter.rb
Class Method Summary collapse
-
.dbslayer_connection(config) ⇒ Object
Establishes a connection to the database that’s used by all Active Record objects.
Class Method Details
.dbslayer_connection(config) ⇒ Object
Establishes a connection to the database that’s used by all Active Record objects.
8 9 10 11 12 13 14 15 |
# File 'lib/active_record/connection_adapters/dbslayer_adapter.rb', line 8 def self.dbslayer_connection(config) # :nodoc: config = config.symbolize_keys host = config[:host] port = config[:port] connection = ConnectionAdapters::DbslayerConnection.new(host, port) ConnectionAdapters::DbslayerAdapter.new(connection, logger, [host, port], config) end |