Class: Decidim::Conferences::Admin::InviteJoinConferenceMailer

Inherits:
ApplicationMailer
  • Object
show all
Includes:
SanitizeHelper, TranslationsHelper
Defined in:
decidim-conferences/app/mailers/decidim/conferences/admin/invite_join_conference_mailer.rb

Overview

A custom mailer for sending an invitation to join a conference to an existing user.

Instance Method Summary collapse

Methods included from SanitizeHelper

#decidim_html_escape, #decidim_sanitize, #decidim_sanitize_newsletter, #decidim_url_escape, included

Methods included from TranslationsHelper

empty_translatable, ensure_translatable, multi_translation, translated_in_current_locale?

Methods included from TranslatableAttributes

#default_locale?

Instance Method Details

#invite(user, conference, registration_type, invited_by) ⇒ Object

Send an email to an user to invite them to join a conference.

user - The user being invited conference - The conference being joined. invited_by - The user performing the invitation.


22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'decidim-conferences/app/mailers/decidim/conferences/admin/invite_join_conference_mailer.rb', line 22

def invite(user, conference, registration_type, invited_by)
  with_user(user) do
    @user = user
    @conference = conference
    @invited_by = invited_by
    @organization = @conference.organization
    @locator = Decidim::ResourceLocatorPresenter.new(@conference)
    @registration_type = registration_type

    subject = I18n.t("invite.subject", scope: "decidim.conferences.mailer.invite_join_conference_mailer")
    mail(to: user.email, subject: subject)
  end
end