class ModerationMailer < ActionMailer::Base default from: 'moderateurs@agendadulibre.org' default to: 'moderateurs@agendadulibre.org' def create(event) @event = event mail 'Message-ID' => "", subject: t('moderation_mailer.create.subject', subject: event.title) end def update(event, current_user) @event = event @current_user = current_user mail 'In-Reply-To' => "", subject: t('moderation_mailer.update.subject', subject: event.title) end def accept(event, current_user) @event = event @current_user = current_user mail 'In-Reply-To' => "", subject: t('moderation_mailer.accept.subject', subject: event.title) end def destroy(event, current_user, reason) @event = event @current_user = current_user @reason = reason mail 'In-Reply-To' => "", subject: t('moderation_mailer.destroy.subject', subject: event.title) end end