I believe this is achieved through a shared account. At the same time, resources in your current system will be covered by this account. those. your index actions are something like @projects = @ account.projects. Looking at basecamp, I would say that it scales very well! If you run into this problem then you have a good problem to solve, don't worry too much about it until then. I have to imagine that the database is a cluster, but I doubt very much that each user has his own set of tables, which will become a nightmare to manage!
A quick google and I found the following: http://www.robbyonrails.com/articles/2009/01/11/subdomain-accounts-with-ruby-on-rails-explained , which also links to a DHH post that looks like this as he explains how they did it.
There are probably new records, but I guess they will be a great start.
Good luck
source share