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

40 lines
1.0 KiB
Ruby
Raw Normal View History

2014-06-09 12:18:40 +02:00
class ModerationMailer < ActionMailer::Base
default from: 'moderateurs@agendadulibre.org'
2014-06-23 23:39:42 +02:00
TO = 'moderateurs@agendadulibre.org'
2014-06-09 12:18:40 +02:00
# 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
2014-06-23 23:39:42 +02:00
mail to: TO, subject: t('moderation_mailer.create.subject', subject: event.title)
2014-06-09 12:18:40 +02:00
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
2014-06-23 23:39:42 +02:00
mail to: TO, subject: t('moderation_mailer.update.subject', subject: event.title)
2014-06-09 12:18:40 +02:00
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
2014-06-23 23:39:42 +02:00
mail to: TO, subject: t('moderation_mailer.moderate.subject', subject: event.title)
2014-06-09 12:18:40 +02:00
end
end