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