mirror of
https://github.com/internetee/registry.git
synced 2025-07-20 01:36:02 +02:00
Refactor email sending, tests
This commit is contained in:
parent
d3c17ce4e3
commit
12e32af524
3 changed files with 24 additions and 7 deletions
|
@ -20,9 +20,7 @@ class Registrar::InvoicesController < RegistrarController
|
|||
|
||||
@invoice.billing_email = params[:invoice][:billing_email]
|
||||
|
||||
if @invoice.forward
|
||||
pdf = @invoice.pdf(render_to_string('pdf', layout: false))
|
||||
InvoiceMailer.invoice_email(@invoice, pdf).deliver_now
|
||||
if @invoice.forward(render_to_string('pdf', layout: false))
|
||||
flash[:notice] = t('invoice_forwared')
|
||||
redirect_to([:registrar, @invoice])
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue