Class: Decidim::Meetings::Admin::InviteJoinMeetingMailer
- Inherits:
-
ApplicationMailer
- Object
- ApplicationMailer
- Decidim::Meetings::Admin::InviteJoinMeetingMailer
- Includes:
- ApplicationHelper, SanitizeHelper, TranslationsHelper
- Defined in:
- app/mailers/decidim/meetings/admin/invite_join_meeting_mailer.rb
Overview
A custom mailer for sending an invitation to join a meeting to an existing user.
Instance Method Summary collapse
-
#invite(user, meeting, invited_by) ⇒ Object
Send an email to an user to invite them to join a meeting.
Instance Method Details
#invite(user, meeting, invited_by) ⇒ Object
Send an email to an user to invite them to join a meeting.
user - The user being invited meeting - The meeting being joined. invited_by - The user performing the invitation.
24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'app/mailers/decidim/meetings/admin/invite_join_meeting_mailer.rb', line 24 def invite(user, meeting, invited_by) with_user(user) do @user = user @meeting = meeting @invited_by = invited_by @organization = @meeting.organization @locator = Decidim::ResourceLocatorPresenter.new(@meeting) subject = I18n.t("invite.subject", scope: "decidim.meetings.mailer.invite_join_meeting_mailer") mail(to: user.email, subject:) end end |