Add mongoid support

@aditya-kapoor this has been fixed on master by used of constants, can you incorporate that, instead of new method.