mirror of
https://github.com/internetee/registry.git
synced 2025-06-08 05:34:46 +02:00
- Remove `Que::Mailer` (#895) - Extract controllers - Extract translations - Convert HAML to ERB - Add mailer preview - Improve UI - Remove unused routes - Add tests
9 lines
No EOL
290 B
Ruby
9 lines
No EOL
290 B
Ruby
class InvoiceMailer < ApplicationMailer
|
|
def invoice_email(invoice:, recipient:)
|
|
@invoice = invoice
|
|
|
|
subject = default_i18n_subject(invoice_number: invoice.number)
|
|
attachments["invoice-#{invoice.number}.pdf"] = invoice.as_pdf
|
|
mail(to: recipient, subject: subject)
|
|
end
|
|
end |