lib/generators/authpro/templates/password_resets_controller.rb in authpro-0.1.0 vs lib/generators/authpro/templates/password_resets_controller.rb in authpro-0.9.0
- old
+ new
@@ -4,10 +4,11 @@
def create
user = User.find_by email: params[:email]
if user
- user.send_password_reset
+ user.prepare_password_reset
+ UserMailer.password_reset(user).deliver
redirect_to root_url, notice: "Email sent with password reset instructions."
else
flash.now.alert = "We could not find anyone with that email address."
render "new"
end