Compatible with mongoid 4 beta