Fixed after_transition with mongoid master (4.0)

This problem is described in #277