Sha256: 24629f6db81dceb7962788e70d73811e47e554c53313eda481d4a51bb51fc688

Contents?: true

Size: 563 Bytes

Versions: 5

Compression:

Stored size: 563 Bytes

Contents

class Mg::ReportMailer < ActionMailer::Base
  
  self.template_root = File.join([File.dirname(__FILE__), '../../views/mountain_goat/'])
  
  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
  
  private
  
  def setup_sender
    
  end
  
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mountain-goat-1.0.5 lib/mountain-goat/models/mg/report_mailer.rb
mountain-goat-1.0.4 lib/mountain-goat/models/mg/report_mailer.rb
mountain-goat-1.0.3 lib/mountain-goat/models/mg/report_mailer.rb
mountain-goat-1.0.2 lib/mountain-goat/models/mg/report_mailer.rb
mountain-goat-1.0.1 lib/mountain-goat/models/mg/report_mailer.rb