I have two databases in SQLite with the same schema. The other
database was populated by an external
customer and then returned. I want to use ActiveRecord to do the
I am not sure of the best way to access the tables in each database
with ActiveRecord models. I could
change the connection dynamically whenever I want to switch between
the databases, but this would seem to be clumsy and error prone.
Another approach would be to create a 2nd set of classes at runtime
which cloned the original ActiveRecord
model classes and inherits from a different base class with a
If anyone has done anything like this or has any suggestions on the
best course of action, I would appreciate it.
Thanks in advance,