Class: JohnHenryMailer

Inherits:
ActionMailer::Base
  • Object
show all
Defined in:
app/mailers/john_henry_mailer.rb

Instance Method Summary collapse

Instance Method Details

#signup(user) ⇒ Object



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

def (user)
  @user = user
  @name = @user.email.split('@').first.try(:titleize)
  subject = "Thanks for trying the JohnHenry Rails toolkit"
  subject += ", #{ @name }" unless @name.blank?
  Rails.logger.info "Sending signup notification to #{ user.email }"
  mail to: user.email,
       subject: subject
end