Class: Decidim::Budgets::VoteReminderMailer
- Inherits:
-
ApplicationMailer
- Object
- ApplicationMailer
- Decidim::Budgets::VoteReminderMailer
- Includes:
- SanitizeHelper, TranslationsHelper
- Defined in:
- app/mailers/decidim/budgets/vote_reminder_mailer.rb
Instance Method Summary collapse
-
#vote_reminder(reminder) ⇒ Object
Send the user an email reminder to finish voting.
Instance Method Details
#vote_reminder(reminder) ⇒ Object
Send the user an email reminder to finish voting
reminder - the reminder to send.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'app/mailers/decidim/budgets/vote_reminder_mailer.rb', line 16 def vote_reminder(reminder) @reminder = reminder @user = reminder.user with_user(@user) do @orders = reminder.records.active.map(&:remindable) @organization = @user.organization subject = I18n.t( "decidim.budgets.vote_reminder_mailer.vote_reminder.email_subject", count: @orders.count ) mail(to: @user.email, subject:) end end |