Tocho Tochev
459be53b5c
People enjoy the instant gratification of a random alert. This brings back email notifications to organizers on volunteer sign-up so that relevant people can react as soon as possible. The email now will contain anonymous data (team name and t-shirt size) and a link for curious people to view the profile. I have considered adding another email address for such notifications, but it seems unnecessarily complicated. Proof of work: ![image](/attachments/dabd0375-17ac-43c8-9698-678e768aa111) ![image](/attachments/fed16195-e668-47c7-9647-5fe069f1ed2d) Reviewed-on: #48 Co-authored-by: Tocho Tochev <tocho@tochev.net> Co-committed-by: Tocho Tochev <tocho@tochev.net>
32 lines
1.0 KiB
Ruby
32 lines
1.0 KiB
Ruby
class VolunteerMailer < ActionMailer::Base
|
|
def team_notification(new_volunteer)
|
|
@volunteer = new_volunteer
|
|
|
|
mail(
|
|
to: @volunteer.conference.email,
|
|
subject: "Нов доброволец за #{@volunteer.conference.title} - #{@volunteer.volunteer_team.name}"
|
|
)
|
|
end
|
|
|
|
def volunteer_notification(new_volunteer)
|
|
@volunteer = new_volunteer
|
|
I18n.locale = @volunteer.language
|
|
mail(to: @volunteer.email,
|
|
reply_to: @volunteer.conference.email,
|
|
from: "OpenFest <cfp@openfest.org>",
|
|
subject: I18n.t("volunteer_mailer.success_notification.subject",
|
|
conference_name: @volunteer.conference.title))
|
|
end
|
|
|
|
def volunteer_email_confirmation(new_volunteer)
|
|
@volunteer = new_volunteer
|
|
I18n.locale = @volunteer.language
|
|
mail(to: @volunteer.email,
|
|
reply_to: @volunteer.conference.email,
|
|
from: "OpenFest <cfp@openfest.org>",
|
|
subject: I18n.t("volunteer_mailer.email_confirmation.subject",
|
|
conference_name: @volunteer.conference.title))
|
|
end
|
|
|
|
end
|