From 0906c517cb32908b779b4556621ea34ea69c0bdc Mon Sep 17 00:00:00 2001 From: antoniocarlon Date: Fri, 3 May 2019 14:36:01 +0200 Subject: [PATCH] Added CR suggestions --- app/controllers/password_resets_controller.rb | 5 +---- app/views/password_resets/sent.html.erb | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/app/controllers/password_resets_controller.rb b/app/controllers/password_resets_controller.rb index bfd6115ab8..cb202f2765 100644 --- a/app/controllers/password_resets_controller.rb +++ b/app/controllers/password_resets_controller.rb @@ -19,10 +19,7 @@ class PasswordResetsController < ApplicationController end @user = Carto::User.find_by_email(email) - - if @user - @user.send_password_reset! - end + @user.try(:send_password_reset!) respond_to do |format| format.html { redirect_to CartoDB.path(self, "sent_password_reset") } diff --git a/app/views/password_resets/sent.html.erb b/app/views/password_resets/sent.html.erb index efb50fbd6c..0400c1706f 100644 --- a/app/views/password_resets/sent.html.erb +++ b/app/views/password_resets/sent.html.erb @@ -1,4 +1,4 @@ <% content_for :title do %>Password sent<% end %> <% title = 'Ok, we have sent you an email' %> -<% description = "There you will find the instructions for entering your account and change — if desired — your password. If you don't see the email in your inbox make sure that the email address is correct" %> +<% description = "There you will find the instructions for entering your account and change — if desired — your password. If you don't see the email in your inbox, make sure that the email address is correct" %> <%= render :partial => 'message', locals: { title: title, description: description } %> \ No newline at end of file