git ssb

0+

dangerousbeans / %aPBe2k3ugtjBr4rrsU1…



Commit 23b0517e20e7ddf2e733c1bcdb22b0b12166f042

Merge pull request #136 from remvee/fix/remove-forgot-password-example

Remove Rails forgot password example
T.J. Schuck committed on 3/31/2016, 3:10:12 PM
Parent: fbbece54c6cb8b53db01132c7eeb58955944547d
Parent: 136180d69985560ef1c8af7ced4d04895e90c31e

Files changed

README.mdchanged
README.mdView
@@ -75,19 +75,8 @@
7575 redirect_to home_url
7676 end
7777 end
7878
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-
9079 ## How to use bcrypt-ruby in general
9180
9281 require 'bcrypt'
9382

Built with git-ssb-web