Class: Decidim::Votings::Census::ExportMailer
- Inherits:
-
ApplicationMailer
- Object
- ApplicationMailer
- Decidim::Votings::Census::ExportMailer
- Includes:
- TranslatableAttributes
- Defined in:
- app/mailers/decidim/votings/census/export_mailer.rb
Overview
This mailer sends a notification email containing the export as an attachment.
Instance Method Summary collapse
-
#access_codes_export(user, voting, filename, password) ⇒ Object
Public: Sends a notification email with a link to retrieve the result of a access codes export in a zipped file.
Instance Method Details
#access_codes_export(user, voting, filename, password) ⇒ Object
Public: Sends a notification email with a link to retrieve the result of a access codes export in a zipped file.
user - The user to be notified.
Returns nothing.
16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'app/mailers/decidim/votings/census/export_mailer.rb', line 16 def access_codes_export(user, voting, filename, password) @password = password @user = user @organization = user.organization @file_url = export_file_url(user, voting, filename) with_user(user) do mail( to: "#{user.name} <#{user.email}>", subject: I18n.t("export_mailer.access_codes_export.subject", scope: "decidim.votings.census", voting_title: translated_attribute(voting.title)) ) end end |