Fix for rails 4 / mongoid 4