Tested this for the mongoid version 3.1.2