Fix after transition with mongoid master/rails4.

Thanks @aganov.