Consider web (MVC, for example Rails) application for multiple clients as a service.
How to design this?
one application instance per client? (+ one database per client)
one instance for all clients (+ one database for all clients)
Former one is simple, but... "inefficient". How about the latter? (best practices, design patterns) How to separate client data? For example: worker "A" of client "1" has two documents, worker "B" of client "2" has three documents. How to build model associations to protect other users (and clients) data? I think joining every query with Client model is not a good solution.