开发者

How do you use different databases with Rails, depending not on the model but on the session?

开发者 https://www.devze.com 2023-03-20 02:27 出处:网络
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.

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?

0

精彩评论

暂无评论...
验证码 换一张
取 消