Created
October 1, 2012 12:24
-
-
Save neilmiddleton/3811369 to your computer and use it in GitHub Desktop.
Report Mailer
This file contains hidden or 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
| @report = Reports::BusinessIntelligenceReport.new | |
| @report.customer_id = customer_id.to_i | |
| @report.start_date = Date.strptime(start_date, "%m/%d/%Y") | |
| @report.end_date = Date.strptime(end_date, "%m/%d/%Y") | |
| attachments['business_intelligence_report.csv'] = @report.to_csv | |
| mail(to: email, subject: "Business Intelligence Report") do |format| | |
| format.text | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment