Module: ActiveRecord::ConnectionHandling
- Defined in:
- lib/active_record/connection_adapters/patch_connection_handling.rb
Instance Method Summary collapse
-
#percona_connection(config) ⇒ Object
Establishes a connection to the database that’s used by all Active Record objects.
Instance Method Details
#percona_connection(config) ⇒ Object
Establishes a connection to the database that’s used by all Active Record objects.
9 10 11 12 13 14 15 16 |
# File 'lib/active_record/connection_adapters/patch_connection_handling.rb', line 9 def percona_connection(config) if config[:username].nil? config = config.dup if config.frozen? config[:username] = 'root' end Departure::RailsAdapter.for_current.create_connection_adapter(**config) end |