sends budget investment created email

This commit is contained in:
rgarcia
2017-01-13 17:38:04 +01:00
parent d17a07b096
commit 82322ee233
5 changed files with 31 additions and 2 deletions

View File

@@ -74,6 +74,14 @@ class Mailer < ApplicationMailer
end
end
def budget_investment_created(investment)
@investment = investment
with_user(@investment.author) do
mail(to: @investment.author.email, subject: t('mailers.budget_investment_created.subject'))
end
end
private
def with_user(user, &block)