From fd966911c1b55353221f9bfc83598814126b459c Mon Sep 17 00:00:00 2001 From: Eric Schultz Date: Fri, 30 Aug 2019 13:02:17 -0500 Subject: [PATCH] Fix for campaign creator email being sent to donor --- app/views/donation_mailer/_donation_payment_table.html.erb | 2 +- .../donation_mailer/nonprofit_payment_notification.html.erb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/donation_mailer/_donation_payment_table.html.erb b/app/views/donation_mailer/_donation_payment_table.html.erb index 0b3af361..ffcb005e 100644 --- a/app/views/donation_mailer/_donation_payment_table.html.erb +++ b/app/views/donation_mailer/_donation_payment_table.html.erb @@ -28,7 +28,7 @@ <% if donation.campaign && donation.campaign.published %> <%= t('donation.campaign') %> - <%= donation.campaign.name %>(Campaign Id: <%= donation.campaign.id%>, Creator: <%= donation.campaign.profile.user.email %>) + <%= donation.campaign.name %>(Campaign Id: <%= donation.campaign.id%><% if @show_campaign_creator %>, Creator: <%= donation.campaign.profile.user.email %><% end %>) <% end %> diff --git a/app/views/donation_mailer/nonprofit_payment_notification.html.erb b/app/views/donation_mailer/nonprofit_payment_notification.html.erb index efa2673e..35788c21 100644 --- a/app/views/donation_mailer/nonprofit_payment_notification.html.erb +++ b/app/views/donation_mailer/nonprofit_payment_notification.html.erb @@ -14,6 +14,7 @@ <%= render 'components/email/supporter_table', supporter: @donation.supporter %>
+<% @show_campaign_creator = true%> <%= render 'donation_mailer/donation_payment_table', donation: @donation, charge: @charge %> <% if @donation.recurring_donation %>