I would like to Rails use database A or database B, both the exact same schema, depending on the the identity of the logged in user.
So to be clear, my problem is not the same as the one solved here:
http://weare.buildingsky.net/2006/12/06/multiple-concurrent-database-connections-with-activerecord
I'd like to use the same exact models, but a different databases, depending on who is log开发者_开发百科ged in. Is this easy to do?
精彩评论