Created
June 11, 2015 14:03
-
-
Save jessecurry/5d17f241c1d2a5ce7c4b to your computer and use it in GitHub Desktop.
Report Mailer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ReportMailer < ApplicationMailer | |
def new_report_email recipient, report_builder | |
attachments['report.pdf'] = { mime_type: 'application/pdf', content: report_builder.generate_stream } | |
mail(to: recipient, subject: report_builder.title) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment