I am about to begin writing a Rails application that will allow clients to have a separate subdomain for their access to our application. Thinking from a data security stand
Turns out I just asked a really similar question but quite a bit further along in development - I've included three ideas for how to go about securely using a single database in there.