Sha256: e539ccf3585e2dd21db53c8f148b369d5516512c8e3bbedae3da988175ebd902
Contents?: true
Size: 1.06 KB
Versions: 39
Compression:
Stored size: 1.06 KB
Contents
# frozen_string_literal: true module Decidim module Elections # This mailer sends a notification email with the accepted vote information. class VoteAcceptedMailer < Decidim::ApplicationMailer include TranslatableAttributes # Public: Sends a notification email with the accepted vote information when there is no # user to notify. # # vote - The vote to be notified. # verify_url - The url to verify the vote. # locale - The locale that will be used for the email content (optional). # # Returns nothing. def notification(vote, verify_url, locale = nil) @vote = vote @verify_url = verify_url @organization = vote.election.component.organization I18n.with_locale(locale || @organization.default_locale) do @election_title = translated_attribute(vote.election.title) mail(to: vote.email, subject: I18n.t("votes.accepted_votes.email_subject", scope: "decidim.events.elections", resource_name: @election_title)) end end end end end
Version data entries
39 entries across 39 versions & 1 rubygems