Browse files

Finalize readme

  • Loading branch information...
1 parent 8c2d7ca commit 61cbffa8e7f868708a5884b192a39e3f26657180 @ErwinM committed Oct 3, 2011
Showing with 9 additions and 2 deletions.
  1. +8 −1
  2. +1 −1 acts_as_tenant.gemspec
@@ -1,7 +1,7 @@
Acts As Tenant
-note: acts_as_tenant was introduced in [this]( blog post.
+note: acts_as_tenant was introduced in this [blog post](
This gem was born out of our own need for a fail-safe and out-of-the-way manner to add multi-tenancy to our Rails app through a shared database strategy, that integrates (near) seamless with Rails.
@@ -86,6 +86,13 @@ Some examples to illustrate this behavior:
Acts_as_tenant uses Rails' default_scope method to scope models. Rails 3.1 changed the way default_scope works in a good way. A user defined default_scope should integrate seamlessly with the one added by acts_as_tenant.
+**Validating attribute uniqueness**
+If you need to validate for uniqueness, chances are that you want to scope this validation to a tenant. You can do so by using:
+ validates_uniqueness_to_tenant :name, :email
+All options available to Rails' own @validates_uniqueness_of@ are also available to this method.
To Do
* Change the tests to Test::Unit so I can easily add some controller tests.
@@ -8,7 +8,7 @@ do |s|
s.authors = ["Erwin Matthijssen"] = [""]
s.homepage = ""
- s.summary = %q{Add multi-tenancy to Rails applications with a shared db}
+ s.summary = %q{Add multi-tenancy to Rails applications using a shared db strategy}
s.description = %q{Integrates multi-tenancy into a Rails application in a convenient and out-of-your way manner}
s.rubyforge_project = "acts_as_tenant"

0 comments on commit 61cbffa

Please sign in to comment.