Sha256: 1d0033265b30e64a559b1da4c10d314bf2e2c4037435fa34dfe4aba746aabd09

Contents?: true

Size: 387 Bytes

Versions: 10

Compression:

Stored size: 387 Bytes

Contents

class Notifier < ActionMailer::Base
  default :from => 'noreply@company.com'

  def instructions(user)
    @user = user

    # normal syntax
    xlsx = render_to_string handlers: [:axlsx], template: 'users/send_instructions', layout: false
    attachments["user_#{user.id}.xlsx"] = {mime_type: Mime::XLSX, content: xlsx}

    mail :to => user.email, :subject => 'Instructions'
  end

end

Version data entries

10 entries across 10 versions & 3 rubygems

Version Path
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/caxlsx_rails-0.6.3/spec/dummy/app/mailers/notifier.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/caxlsx_rails-0.6.3/spec/dummy/app/mailers/notifier.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/caxlsx_rails-0.6.3/spec/dummy/app/mailers/notifier.rb
caxlsx_rails-0.6.3 spec/dummy/app/mailers/notifier.rb
caxlsx_rails-0.6.2 spec/dummy/app/mailers/notifier.rb
axlsx_rails-0.6.1 spec/dummy/app/mailers/notifier.rb
axlsx_rails-0.6.0 spec/dummy/app/mailers/notifier.rb
axlsx_rails-0.5.2 spec/dummy/app/mailers/notifier.rb
axlsx_rails-0.5.1 spec/dummy/app/mailers/notifier.rb
axlsx_rails-0.5.0 spec/dummy/app/mailers/notifier.rb