Hello all
I took a different approach than what is outlined in this howto:
http://wiki.rubyonrails.com/rails/show/HowtoUseMultipleDatabases
I created a new class in my application.rb that looks like this:
class ForeignDistPlan < ActiveRecord::Base
end
and then from within a method (in the default model class):
arrayOfHashes = ForeignDistPlan.connection.select_all
("#{connectionString}")
This gets the results I need from the secondary database, and all my subsequent
calls the the default model class connect to the default databse without any
problems so far.
THis is per the docs: http://api.rubyonrails.com/classes/ActiveRecord/Base.html
under the title ''Connection to multiple databases in different
models''
Is this a bad idea?
Thank you for any input.
-Erin
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/