Forum: Ruby on Rails Re: multiple database users for rails app?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
E1f43bafda26307a050d11902752b2a6?d=identicon&s=25 Ball, Donald A Jr (Library) (Guest)
on 2007-01-22 23:25
(Received via mailing list)
> check for the existence of this session variable and act accordingly.
That's easy enough to do, but how do I "act accordingly"? How do I tell
my controller that, based on the presence of this session property,
connect to the database using these credentials instead of those?

- donald
Bd24c5b58cc29f2f9cc2db3c0d3d4a89?d=identicon&s=25 mchenryc (Guest)
on 2007-01-23 01:16
(Received via mailing list)
Sounds to me like you want two DB connections, one for each user.  Use
the session variable to choose which connection to use.  Multiple
connections to one db should be equivalent to connecting to multiple
This topic is locked and can not be replied to.