Class: UserMailer

Inherits:
ApplicationMailer show all
Defined in:
app/mailers/user_mailer.rb

Overview

Mailer for user-related things

Instance Method Summary collapse

Instance Method Details

#login_attempt(user_id) ⇒ Object

Parameters:

  • user_id (Integer)


6
7
8
9
10
11
12
# File 'app/mailers/user_mailer.rb', line 6

def (user_id)
  @user = User.find_by(id: user_id)

  return if @user.nil? || @user.email.blank?

  mail to: @user.email
end