Commit 23b0517e20e7ddf2e733c1bcdb22b0b12166f042
Merge pull request #136 from remvee/fix/remove-forgot-password-example
Remove Rails forgot password exampleT.J. Schuck committed on 3/31/2016, 3:10:12 PM
Parent: fbbece54c6cb8b53db01132c7eeb58955944547d
Parent: 136180d69985560ef1c8af7ced4d04895e90c31e
Files changed
README.md | changed |
README.md | ||
---|---|---|
@@ -75,19 +75,8 @@ | ||
75 | 75 … | redirect_to home_url |
76 | 76 … | end |
77 | 77 … | end |
78 | 78 … | |
79 | -### If a user forgets their password? | |
80 | - | |
81 | - # assign them a random one and mail it to them, asking them to change it | |
82 | - def forgot_password | |
83 | - @user = User.find_by_email(params[:email]) | |
84 | - random_password = Array.new(10).map { (65 + rand(58)).chr }.join | |
85 | - @user.password = random_password | |
86 | - @user.save! | |
87 | - Mailer.create_and_deliver_password_change(@user, random_password) | |
88 | - end | |
89 | - | |
90 | 79 … | ## How to use bcrypt-ruby in general |
91 | 80 … | |
92 | 81 … | require 'bcrypt' |
93 | 82 … |
Built with git-ssb-web