Created
September 12, 2014 03:51
-
-
Save nambrot/ceff6f3890b23f8ff50c to your computer and use it in GitHub Desktop.
/app/controllers/devise/passwords_controller.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GET /resource/password/edit?reset_password_token=abcdef | |
def edit | |
# Find the resource with the token | |
self.resource = resource_class.find_by_reset_password_token!(params[:reset_password_token]) | |
# Add the error if the password period is invalid | |
resource.errors.add :reset_password_token, :expired unless resource.reset_password_period_valid? | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment