README.rdoc in multitenant-0.2.0 vs README.rdoc in multitenant-0.3.0
- old
+ new
@@ -3,20 +3,20 @@
When building multitenant applications, never let an unscoped Model.all accidentally leak data to an unintended audience.
== Usage
class User < ActiveRecord::Base
- belongs_to :company
- belongs_to_tenant :company
+ belongs_to :tenant
+ belongs_to_multitenant
end
- Multitenant.with_tenant current_company do
+ Multitenant.with_tenant current_tenant do
# queries within this block are automatically
- # scoped to the current company
+ # scoped to the current tenant
User.all
# new objects created within this block are automatically
- # assigned to the current company
+ # assigned to the current tenant
User.create :name => 'Bob'
end
== Features