Thanks Amar. Sharding isn't exactly what I need here, but some interesting info nonetheless.
I have a main db ( users, applications, etc ) and a database for each customer ( products, orders, etc ) When I want to get all the products, for example, I need to connect to a particular customers version of products. I can do it by using ActiveRecord::Base.establish_connection (:connection_name) in the controller but its not perfect... also there are some plugins that use some activeRecord stuff in them and the model doesn't know which db its supposed to connect to so I have to modify all those gems and put the establish_connection in there too. I put the customer in session on user login, and then I can easily get which customer db I need, but again that doesn't work so well in the models since the session isn't easily available in the models. On Nov 2, 7:12 am, Amar Daxini <[email protected]> wrote: > jmamma wrote: > > Hey everyone! I have a problem that's been making me a little nuts. > > I would like to use RoR for a upcoming project, but if I can't get > > past this hiccup I'm > > afraid I'll have to use PHP or Java. Ugh. > > check out data_fabric gemhttp://www.codefutures.com/database-sharding/and > check this article > -- > Posted viahttp://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

