Re: multiple database users for rails app?

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

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
databases: http://www.google.com/search?q=rails+multiple+databases

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs