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

39 lines
1.1 KiB
Ruby
Raw Normal View History

2014-06-09 12:18:40 +02:00
class ModerationMailer < ActionMailer::Base
default from: '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@example.org", 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@example.org", 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@example.org", subject: t('moderation_mailer.moderate.subject', subject: event.title)
end
end