Custom Database adapters

Hi. I’ve created a custom database adapter, but I’d like to modify the
RAILS_CONNECTION_ADAPTERS variable, and add the adapter in my rails app
rather than modifying the activerecord directory.

Does anyone know how to do this, or can point me to info online? Thank
you.

–Aaron

Hello Aaron,

Hi. I’ve created a custom database adapter, but I’d like to modify the
RAILS_CONNECTION_ADAPTERS variable, and add the adapter
in my rails app
rather than modifying the activerecord directory.

Have you tried to define RAILS_CONNECTION_ADAPTERS
in config/environment.rb ?

sth like :


RAILS_CONNECTION_ADAPTERS = %w(mysql my_custom_adapter)

Rails::Initializer.run do |config|

Just my 2 (euro)cents,

РJean-Fran̤ois.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs