Hello, I need some guidance. I have a need to:
a) Login, validating against a “system-level” user database - no big
b) Depending upon the login, select a customer database for processing.
For instance, assume that my login profile lists an area of interest:
cars, motorcycles or boats. Each of these has a database, with identical
table formats. If my login shows my area of interest to be boats, then I
want to disconnect from the system-level database, and establish a
connection to the boats database. At this point in time only the
system-level database appears in the database.yml file.
The example at
pretty straight-forward, but I’ve been unable to make this work. The
code in “hijack_db” is executing, but the new database is not connected
when the change to my “items” connector is called. The example looks
like it’s for a version of Rails prior to 1.0, which I’m now using, and
using the Webrick server for testing.
Does anybody have any thoughts on getting this switch to take place?