Class: Decidim::Meetings::CloseMeetingReminderMailer

Inherits:
ApplicationMailer
  • Object
show all
Includes:
ActionView::Helpers::SanitizeHelper, ApplicationHelper, TranslationsHelper
Defined in:
app/mailers/decidim/meetings/close_meeting_reminder_mailer.rb

Overview

A custom mailer for sending notifications for overdue meetings

Instance Method Summary collapse

Instance Method Details

#close_meeting_reminder(record) ⇒ Object

Send the user an email reminder to close the meetings

record - the reminder record specific to a past meeting.



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'app/mailers/decidim/meetings/close_meeting_reminder_mailer.rb', line 20

def close_meeting_reminder(record)
  @reminder = record.reminder
  @user = record.reminder.user
  with_user(@user) do
    @meeting = record.remindable
    @organization = @user.organization
    mail(
      to: @user.email,
      subject: I18n.t(
        "decidim.meetings.close_meeting_reminder_mailer.close_meeting_reminder.subject",
        meeting_title: decidim_sanitize_translated(@meeting.title)
      )
    )
  end
end