Added support for Mongoid.