link email logs to the post that generate the email notification when available

This commit is contained in:
Régis Hanol
2016-02-16 16:35:57 +01:00
parent 81c6fb318b
commit bf96025507
5 changed files with 31 additions and 8 deletions

View File

@@ -67,7 +67,7 @@ class Admin::EmailController < Admin::AdminController
private
def filter_email_logs(email_logs, params)
email_logs = email_logs.includes(:user)
email_logs = email_logs.includes(:user, { post: :topic })
.references(:user)
.order(created_at: :desc)
.offset(params[:offset] || 0)