victor-github/pg_tools — pull request #5 by felafelwaffle (2013-08-25 05:59:58+00:00)
Title: Don't assume User model and allow customizing the attribute for schema naming 

Resolving issues #3 and #4. The code and rake tasks no longer assume that the tenant aware model is "User". The rake tasks now accept an optional parameter to set the tenant model explicitly. Also, now acts_as_tenant_aware accepts an optional configuration hash that lets you customize the model attribute that is used for naming each tenant's schema. The readme has been updated to reflect all of these changes as well as to provide sample code for setting up a per-subdomain tenant. Commit cfaf3b1 also fixes a bug where creating a new tenant record obliterates all tables in the public schema!