Sha256: 0c9f24970b2c7de2cf9fd3e8237b0f341674c1965090599f9ec8d0c06d306d3d

Contents?: true

Size: 356 Bytes

Versions: 6

Compression:

Stored size: 356 Bytes

Contents

class ReportsMailer < ActionMailer::Base
  def send_report
    @items = [
      {name: "Hello"},
      {name: "World"},
    ]

    attachments["report.pdf"] = {
      mime_type: "application/pdf",
      content: render_to_string("reports/sample", formats: [:pdf]),
    }

    mail({
      to: "user@example.com",
      subject: "Reports",
    })
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
prawn-rails-1.4.2 test/dummy_app/app/mailers/reports_mailer.rb
prawn-rails-1.4.1 test/dummy_app/app/mailers/reports_mailer.rb
prawn-rails-1.4.0 test/dummy_app/app/mailers/reports_mailer.rb
prawn-rails-1.3.0 test/dummy_app/app/mailers/reports_mailer.rb
prawn-rails-1.2.1 test/dummy_app/app/mailers/reports_mailer.rb
prawn-rails-1.2.0 test/dummy_app/app/mailers/reports_mailer.rb