You can report a single post by clicking the correct icon in the controler section Workflow: * Report a post as offensive * Trigger alerts to every pod-admin * Pod-admin can review it in the admin interface * Delete the post or mark it as reviewed
18 lines
506 B
Ruby
18 lines
506 B
Ruby
class PostReportMailer < ActionMailer::Base
|
|
default :from => AppConfig.mail.sender_address
|
|
|
|
def new_report
|
|
Role.admins.each do |role|
|
|
email = User.find_by_id(role.person_id).email
|
|
format(email).deliver
|
|
end
|
|
end
|
|
|
|
private
|
|
def format(email)
|
|
mail(to: email, subject: I18n.t('notifier.post_report_email.subject')) do |format|
|
|
format.text { render 'post_report/post_report_email' }
|
|
format.html { render 'post_report/post_report_email' }
|
|
end
|
|
end
|
|
end
|