agenda-libre-ruby/app/mailers/moderation_mailer.rb

40 lines
1.0 KiB
Ruby

class ModerationMailer < ActionMailer::Base
default from: 'moderateurs@agendadulibre.org'
TO = 'moderateurs@agendadulibre.org'
# Subject can be set in your I18n file at config/locales/en.yml
# with the following lookup:
#
# en.moderation_mailer.create.subject
#
def create(event)
@event = event
mail to: TO, subject: t('moderation_mailer.create.subject', subject: event.title)
end
# Subject can be set in your I18n file at config/locales/en.yml
# with the following lookup:
#
# en.moderation_mailer.update.subject
#
def update(event, current_user)
@event = event
@current_user = current_user
mail to: TO, subject: t('moderation_mailer.update.subject', subject: event.title)
end
# Subject can be set in your I18n file at config/locales/en.yml
# with the following lookup:
#
# en.moderation_mailer.moderate.subject
#
def moderate(event, current_user)
@event = event
@current_user = current_user
mail to: TO, subject: t('moderation_mailer.moderate.subject', subject: event.title)
end
end