Class: Mg::ReportMailer

Inherits:
ActionMailer::Base
  • Object
show all
Defined in:
lib/mountain-goat/models/mg/report_mailer.rb

Instance Method Summary collapse

Instance Method Details

#report(report, pdf) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/mountain-goat/models/mg/report_mailer.rb', line 5

def report(report, pdf)
  setup_sender
  @recipients  = report.recipients
  @subject = "[Mountain Goat] - #{report.title}"
  @body[:report] = report
  
  part :content_type => "text/html",
       :body => render_message('report', @body)
      
  attachment :content_type => "application/pdf",
    :filename => "report.pdf",
    :body => pdf
end