Sha256: 5ac8e6c65960f846dab60d6de9876a1fb9582d34c764171c9f3573fb1d2dc587
Contents?: true
Size: 405 Bytes
Versions: 2
Compression:
Stored size: 405 Bytes
Contents
class Notifier < ActionMailer::Base default :from => 'noreply@company.com' def instructions(user) @user = user # normal syntax xlsx = render_to_string handlers: [:wb], template: 'users/mailers/instructions', layout: false, formats: [:xlsx] attachments["user_#{user.id}.xlsx"] = {mime_type: Mime::XLSX, content: xlsx} mail :to => user.email, :subject => 'Instructions' end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
workbook_rails-0.1.1 | spec/dummy/app/mailers/notifier.rb |
workbook_rails-0.1.0 | spec/dummy/app/mailers/notifier.rb |