Class: Decidim::Budgets::SendVoteReminderJob

Inherits:
ApplicationJob
  • Object
show all
Defined in:
app/jobs/decidim/budgets/send_vote_reminder_job.rb

Instance Method Summary collapse

Instance Method Details

#perform(reminder) ⇒ Object



8
9
10
11
12
13
# File 'app/jobs/decidim/budgets/send_vote_reminder_job.rb', line 8

def perform(reminder)
  return if reminder.records.active.blank?

  ::Decidim::ReminderDelivery.create(reminder:)
  ::Decidim::Budgets::VoteReminderMailer.vote_reminder(reminder).deliver_now
end