Compatibility with Mongoid 3