ErwinM/acts_as_tenant — pull request #97 by iangreenleaf (2014-12-19 02:05:47+00:00)
Title: Mongoid compatibility

Since this plugin is mostly based on the ActiveModel interface, it doesn't take a ton of work to integrate it with an alternative to ActiveRecord like Mongoid. Most of the problems I encountered were little things, like:

1. Not requiring active_record automatically - if Rails is using it, it should already be present.
2. Not assuming that model classes will follow the ActiveRecord inheritance scheme.

With these changes, I have basic multitenancy working with Mongoid. My models declare scope like this:

```ruby
class Comment
include Mongoid::Document
include ActsAsTenant::ModelExtensions
belongs_to :tenant
acts_as_tenant :tenant
end
```