Class: UserMailer

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

Instance Method Summary collapse

Instance Method Details

#invited(uuid) ⇒ Object

technically not a ‘user’ email, but they’ll be a user soon. didn’t seem worth creating an entirely new mailer for.



13
14
15
16
17
18
19
20
21
22
23
# File 'app/mailers/user_mailer.rb', line 13

def invited(uuid)
  @invitation = Invitation.find_by_uuid uuid
  return if @invitation.nil?
  @cta_url = (@invitation.uuid)
  @values = {
    # Just in case the inviting user has been removed from the team...
    inviter_name: @invitation.from_membership&.user&.full_name || @invitation.from_membership.name,
    team_name: @invitation.team.name,
  }
  mail(to: @invitation.email, subject: I18n.t("user_mailer.invited.subject", **@values))
end

#welcome(user) ⇒ Object



2
3
4
5
6
7
8
9
# File 'app/mailers/user_mailer.rb', line 2

def welcome(user)
  @user = user
  @cta_url = 
  @values = {
    # are there any substitution values you want to include?
  }
  mail(to: @user.email, subject: I18n.t("user_mailer.welcome.subject", **@values))
end