Forum: Ruby on Rails Custom Database adapters

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Aaron P. (Guest)
on 2006-04-19 02:14
(Received via mailing list)
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
Jean-François (Guest)
on 2006-04-19 02:45
(Received via mailing list)
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 topic is locked and can not be replied to.