sends an email for unfeasible spending proposals

This commit is contained in:
rgarcia
2016-03-09 16:47:10 +01:00
parent 1bbc12dc52
commit 9aaeb23e7f
8 changed files with 103 additions and 0 deletions

View File

@@ -33,6 +33,15 @@ class Mailer < ApplicationMailer
end
end
def unfeasible_spending_proposal(spending_proposal)
@spending_proposal = spending_proposal
@author = spending_proposal.author
with_user(@author) do
mail(to: @author.email, subject: t('mailers.unfeasible_spending_proposal.subject'))
end
end
private
def with_user(user, &block)