- Added Mongoid compatibility [thx iangreenlead]
- Fix for proper handling of polymorphic associations (thx sol1dus)
- Fix fefault scope to generate correct sql when using database prefix (thx IgorDobryn)
- Added ability to specify a custom Primary Key (thx matiasdim)
- Sidekiq 3.2.2+ no longer supports Ruby 1.9. Locking Sidekiq in gemspec at 3.2.1.
- Update RSPEC to 3.0. Convert all specs (thx petergoldstein)
- support sidekiq 3 interface (thx davekaro)
- Added method
- Fix to degredation introduced after 3.1 that prevented tenant_id from being set during initialization (thx jorgevaldivia)
- Fix to a bug introduced in 0.3.2
- Support user defined foreign keys on scoped models
- correctly support nested models with has_many :through (thx dexion)
- Support 'www.subdomain.example.com' (thx wtfiwtz)
- Support setting
tenant_idon scoped models if the
tenant_idis nil (thx Matt Wilson)
- Added support for Rails 4
- You can now raise an exception if a query on a scope model is made without a tenant set. Adding an initializer that sets config.require_tenant to true will accomplish this. See readme for more details.
ActsAsTenant.with_tenantwill now return the value of the block it evaluates instead of the original tenant. The original tenant is restored automatically.
- acts_as_tenant now raises standard errors which can be caught individually.
set_current_tenant_to, which was deprecated some versions ago and could lead to weird errors, has been removed.
- Added support for many-to-many associations (thx Nucleoid)
- Added dependencies to gemspec (thx aaronrenner)
- Added the
ActsAsTenant.with_tenantblock method (see readme) (thx aaronrenner)
- Acts_as_Tenant is now thread safe (thx davide)
- Changed the interface for passing in the current_tenant manually in the controller.
set_current_tenant_tohas been deprecated and replaced by
set_current_tenant_through_filterdeclaration and the
set_current_tenantmethod. See readme for details.
- Fixed a bug with resolving the tenant model name (thx devton!)
- Added support for using relations: User.create(:account => Account.first) now works, while it wouldn't before (thx bnmrrs)
- Added Rails 3.2 compatibility (thx nickveys!)
- Added correct handling of child models that do not have their parent set (foreign key == nil)
- Added support for models that declare a has_one relationships, these would error out in the previous versions.
- Added support for aliased associations ( belongs_to :something, :class_name => 'SomethingElse'). In previous version these would raise an 'uninitialized constant' error.
- Initial release