Forum: Ruby on Rails Oracle connection problems when connecting to multiple datab

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.
2d18ef1be17e02912e76c25691f3c04d?d=identicon&s=25 Jason Hale (Guest)
on 2006-03-19 04:49
(Received via mailing list)
I have a rails application that connects to two different databases.
The
first (primary) database is MySQL and the second is Oracle.  I have
followed
the example in the Rails Recipes book and I have created a base class
for
the models connecting to oracle like this:


class ConferenceBase < ActiveRecord::Base
	establish_connection :conference
end

:conference is setup in the database.yml.

A model subclass can now connect to my Oracle database -- a little too
well.
Every time I do anything with a subclass of this model it establishes a
NEW
connection.  Does anyone know how to do this so a new connection to
Oracle
is created everytime you access the model?

-Jason
This topic is locked and can not be replied to.