add support to mongoid 3

add support to mongoid 3