]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/passwords_controller.rb
Be paranoid when sending password reset emails
[rails.git] / app / controllers / passwords_controller.rb
index 8025fd700977d35f82ba267c2dd9136dee2d80a4..25b2b96075bb2d24e79a8e21f4170a2e89756a65 100644 (file)
@@ -43,12 +43,10 @@ class PasswordsController < ApplicationController
     if user
       token = user.generate_token_for(:password_reset)
       UserMailer.lost_password(user, token).deliver_later
-      flash[:notice] = t ".notice email on way"
-      redirect_to login_path
-    else
-      flash.now[:error] = t ".notice email cannot find"
-      render :new
     end
+
+    flash[:notice] = t ".send_paranoid_instructions"
+    redirect_to login_path
   end
 
   def update