plataformatec/devise — pull request #3318 by BrentWheeldon (2014-11-17 19:45:22+00:00)
Title: Only set token back if password reset fails.

This prevents the digested version of the token being saved when a reset is successful.