diff options
Diffstat (limited to 'app/mailers')
-rw-r--r-- | app/mailers/emails/profile.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/mailers/emails/profile.rb b/app/mailers/emails/profile.rb index 3a83b083109..256cbcd73a1 100644 --- a/app/mailers/emails/profile.rb +++ b/app/mailers/emails/profile.rb @@ -14,7 +14,10 @@ module Emails end def new_ssh_key_email(key_id) - @key = Key.find(key_id) + @key = Key.find_by_id(key_id) + + return unless @key + @current_user = @user = @key.user @target_url = user_url(@user) mail(to: @user.notification_email, subject: subject("SSH key was added to your account")) |