Sha256: a454adb46fd5969ebba1ec5631cb0c881f7a602bab9024ab22f3b6ec00546637

Contents?: true

Size: 910 Bytes

Versions: 234

Compression:

Stored size: 910 Bytes

Contents

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

  # technically not a 'user' email, but they'll be a user soon.
  # didn't seem worth creating an entirely new mailer for.
  def invited(uuid)
    @invitation = Invitation.find_by_uuid uuid
    return if @invitation.nil?
    @cta_url = accept_account_invitation_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
end

Version data entries

234 entries across 234 versions & 1 rubygems

Version Path
bullet_train-1.7.18 app/mailers/user_mailer.rb
bullet_train-1.7.17 app/mailers/user_mailer.rb
bullet_train-1.7.16 app/mailers/user_mailer.rb
bullet_train-1.7.15 app/mailers/user_mailer.rb
bullet_train-1.7.14 app/mailers/user_mailer.rb
bullet_train-1.7.13 app/mailers/user_mailer.rb
bullet_train-1.7.12 app/mailers/user_mailer.rb
bullet_train-1.7.11 app/mailers/user_mailer.rb
bullet_train-1.7.10 app/mailers/user_mailer.rb
bullet_train-1.7.9 app/mailers/user_mailer.rb
bullet_train-1.7.3 app/mailers/user_mailer.rb
bullet_train-1.7.2 app/mailers/user_mailer.rb
bullet_train-1.7.1 app/mailers/user_mailer.rb
bullet_train-1.7.0 app/mailers/user_mailer.rb
bullet_train-1.6.38 app/mailers/user_mailer.rb
bullet_train-1.6.37 app/mailers/user_mailer.rb
bullet_train-1.6.36 app/mailers/user_mailer.rb
bullet_train-1.6.35 app/mailers/user_mailer.rb
bullet_train-1.6.34 app/mailers/user_mailer.rb
bullet_train-1.6.33 app/mailers/user_mailer.rb