mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 00:12:03 +02:00
Refactor email sending, tests
This commit is contained in:
parent
d3c17ce4e3
commit
12e32af524
3 changed files with 24 additions and 7 deletions
|
@ -55,11 +55,11 @@ class Invoice < ActiveRecord::Base
|
|||
"invoice-#{number}.pdf"
|
||||
end
|
||||
|
||||
def forward
|
||||
def forward(html)
|
||||
return false unless valid?
|
||||
return false unless billing_email
|
||||
return false unless billing_email.present?
|
||||
|
||||
# TODO: forward invoice
|
||||
InvoiceMailer.invoice_email(self, pdf(html)).deliver_now
|
||||
true
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue