Class: Decidim::Conferences::ConferenceRegistrationMailer
- Inherits:
-
ApplicationMailer
- Object
- ApplicationMailer
- Decidim::Conferences::ConferenceRegistrationMailer
- Includes:
- ActionView::Helpers::SanitizeHelper, TranslationsHelper
- Defined in:
- app/mailers/decidim/conferences/conference_registration_mailer.rb
Overview
A custom mailer for sending notifications to users when they join a conference.
Instance Method Summary collapse
- #confirmation(user, conference, registration_type) ⇒ Object
- #pending_validation(user, conference, registration_type) ⇒ Object
Instance Method Details
#confirmation(user, conference, registration_type) ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'app/mailers/decidim/conferences/conference_registration_mailer.rb', line 28 def confirmation(user, conference, registration_type) with_user(user) do @user = user @conference = conference @organization = @conference.organization @locator = Decidim::ResourceLocatorPresenter.new(@conference) @registration_type = registration_type subject = I18n.t("confirmation.subject", scope: "decidim.conferences.mailer.conference_registration_mailer") mail(to: user.email, subject:) end end |
#pending_validation(user, conference, registration_type) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'app/mailers/decidim/conferences/conference_registration_mailer.rb', line 15 def pending_validation(user, conference, registration_type) with_user(user) do @user = user @conference = conference @organization = @conference.organization @locator = Decidim::ResourceLocatorPresenter.new(@conference) @registration_type = registration_type subject = I18n.t("pending_validation.subject", scope: "decidim.conferences.mailer.conference_registration_mailer") mail(to: user.email, subject:) end end |