Sha256: 39ba268c8cb3a127bfdb1ffce2ab3dbded8c07650e2fe109cd7c8edb35231812

Contents?: true

Size: 406 Bytes

Versions: 31

Compression:

Stored size: 406 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, formats: [:xlsx]
    attachments["user_#{user.id}.xlsx"] = {mime_type: Mime[:xlsx], content: xlsx}

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

end

Version data entries

31 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_5.0/app/mailers/notifier.rb
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/caxlsx_rails-0.6.3/spec/dummy_6.0/app/mailers/notifier.rb
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/caxlsx_rails-0.6.3/spec/dummy_5.2/app/mailers/notifier.rb
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/caxlsx_rails-0.6.3/spec/dummy_5.1/app/mailers/notifier.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/caxlsx_rails-0.6.3/spec/dummy_5.1/app/mailers/notifier.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/caxlsx_rails-0.6.3/spec/dummy_6.0/app/mailers/notifier.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/caxlsx_rails-0.6.3/spec/dummy_5.2/app/mailers/notifier.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/caxlsx_rails-0.6.3/spec/dummy_5.0/app/mailers/notifier.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/caxlsx_rails-0.6.3/spec/dummy_5.1/app/mailers/notifier.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/caxlsx_rails-0.6.3/spec/dummy_6.0/app/mailers/notifier.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/caxlsx_rails-0.6.3/spec/dummy_5.2/app/mailers/notifier.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/caxlsx_rails-0.6.3/spec/dummy_5.0/app/mailers/notifier.rb
caxlsx_rails-0.6.3 spec/dummy_5.0/app/mailers/notifier.rb
caxlsx_rails-0.6.3 spec/dummy_5.1/app/mailers/notifier.rb
caxlsx_rails-0.6.3 spec/dummy_5.2/app/mailers/notifier.rb
caxlsx_rails-0.6.3 spec/dummy_6.0/app/mailers/notifier.rb
caxlsx_rails-0.6.2 spec/dummy_5.0/app/mailers/notifier.rb
caxlsx_rails-0.6.2 spec/dummy_6.0/app/mailers/notifier.rb
caxlsx_rails-0.6.2 spec/dummy_5.2/app/mailers/notifier.rb
caxlsx_rails-0.6.2 spec/dummy_5.1/app/mailers/notifier.rb