A calendar management project, for events and activities related to communities fighting for freedoms.
This can be related to software, art, data, hardware, content, commons, internet.
https://www.agendadulibre.org
This can be related to software, art, data, hardware, content, commons, internet.
https://www.agendadulibre.org
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.2 KiB
39 lines
1.2 KiB
# Sending mails related to events' moderation |
|
class ModerationMailer < ActionMailer::Base |
|
def create(event) |
|
@event = event |
|
|
|
mail 'Message-ID' => |
|
"<mod-#{event.id}@#{ActionMailer::Base.default_url_options[:host]}>", |
|
subject: t('moderation_mailer.create.subject', subject: event.title) |
|
end |
|
|
|
def update(older_event, event, current_user) |
|
@older_event = older_event |
|
@event = event |
|
@current_user = current_user |
|
|
|
mail 'In-Reply-To' => |
|
"<mod-#{event.id}@#{ActionMailer::Base.default_url_options[:host]}>", |
|
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' => |
|
"<mod-#{event.id}@#{ActionMailer::Base.default_url_options[:host]}>", |
|
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' => |
|
"<mod-#{event.id}@#{ActionMailer::Base.default_url_options[:host]}>", |
|
subject: t('moderation_mailer.destroy.subject', subject: event.title) |
|
end |
|
end
|
|
|