Sha256: d536d76533b93da1a3611e7ea0556c188f08901c090e2753c73ffb303c118870

Contents?: true

Size: 514 Bytes

Versions: 5

Compression:

Stored size: 514 Bytes

Contents

class UserMailer < ApplicationMailer
  before_action :load_params

  def welcome_email
    mail(to: @user.email, subject: "Welcome to #{@service_name}")
  end

  def invite_email
    @accept_path = params[:accept_path]

    mail(to: @user.email, subject: "Invite to #{@service_name}")
  end

  def load_params
    @user = User.find(params[:user_id])
    @invited_by = User.find_by(uid: params[:invited_by_uid])
    @service_name = Rails.configuration.name
    @service_url = Rails.configuration.host_url
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
infinum_id-1.3.1 app/mailers/user_mailer.rb
infinum_id-1.3.0 app/mailers/user_mailer.rb
infinum_id-1.2.0 app/mailers/user_mailer.rb
infinum_id-1.1.0 app/mailers/user_mailer.rb
infinum_id-1.0.0 app/mailers/user_mailer.rb