EDIT for mongoid 4.0.0 and rails 4.1.1