refactors email digest

This commit is contained in:
rgarcia
2016-08-03 19:33:37 +02:00
parent 6281af2a7d
commit b087fe8fb7
4 changed files with 26 additions and 13 deletions

View File

@@ -60,8 +60,8 @@ class Mailer < ApplicationMailer
end
end
def proposal_notification_digest(user)
@notifications = user.notifications.where(notifiable_type: "ProposalNotification")
def proposal_notification_digest(user, notifications)
@notifications = notifications
with_user(user) do
mail(to: user.email, subject: t('mailers.proposal_notification_digest.title', org_name: Setting['org_name']))