clarion/app/mailers/volunteer_mailer.rb

20 lines
732 B
Ruby
Raw Permalink Normal View History

2015-10-21 23:13:39 +03:00
# coding: utf-8
class VolunteerMailer < ActionMailer::Base
def team_notification(new_volunteer)
@volunteer = new_volunteer
mail(to: @volunteer.conference.email,
2015-10-21 23:57:21 +03:00
subject: "Нов доброволец #{@volunteer.name} <#{@volunteer.email}> за екип(и) #{@volunteer.volunteer_teams.map(&:name).join(', ')}")
2015-10-21 23:13:39 +03:00
end
def volunteer_notification(new_volunteer)
@volunteer = new_volunteer
I18n.locale = @volunteer.language
mail(to: @volunteer.email,
reply_to: @volunteer.conference.email,
from: 'no-reply@openfest.org',
subject: I18n.t('volunteer_mailer.success_notification.subject',
conference_name: @volunteer.conference.title))
end
end