Sha256: eb5a098b104650538e4b75e6ea5dfcff9947bdbbc8e6d42af09ede48df0ba569

Contents?: true

Size: 761 Bytes

Versions: 30

Compression:

Stored size: 761 Bytes

Contents

module ClarkKent
  class ReportMailer < ActionMailer::Base
  	default from: 'reservations@invitedhome.com'

  	def report_run(report_id, user_id, report_download_url)
  		@report = Report.find(report_id)
  		@user = User.find(user_id)
  		@recipient_email = @user.email
  		@report_download_url = report_download_url
  		@subject = "Your report #{@report.name} is ready"
  		mail(to: @recipient_email, subject: @subject)
  	end

    def report_error(report_id, user_id, error_message)
      @report = Report.find(report_id)
      @user = User.find(user_id)
      @recipient_email = @user.email
      @error_message = error_message
      @subject = "Your report #{@report.name} has a problem"
      mail(to: @recipient_email, subject: @subject)
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
clark_kent-0.10.4 app/mailers/clark_kent/report_mailer.rb
clark_kent-0.10.2 app/mailers/clark_kent/report_mailer.rb
clark_kent-0.10.1 app/mailers/clark_kent/report_mailer.rb
clark_kent-0.10.0 app/mailers/clark_kent/report_mailer.rb
clark_kent-0.9.9 app/mailers/clark_kent/report_mailer.rb
clark_kent-0.9.8 app/mailers/clark_kent/report_mailer.rb
clark_kent-0.9.7 app/mailers/clark_kent/report_mailer.rb
clark_kent-0.9.6 app/mailers/clark_kent/report_mailer.rb
clark_kent-0.9.5 app/mailers/clark_kent/report_mailer.rb
clark_kent-0.9.4 app/mailers/clark_kent/report_mailer.rb
clark_kent-0.9.2 app/mailers/clark_kent/report_mailer.rb
clark_kent-0.9.1 app/mailers/clark_kent/report_mailer.rb
clark_kent-0.9.0 app/mailers/clark_kent/report_mailer.rb
clark_kent-0.8.11 app/mailers/clark_kent/report_mailer.rb
clark_kent-0.8.10 app/mailers/clark_kent/report_mailer.rb
clark_kent-0.8.9 app/mailers/clark_kent/report_mailer.rb
clark_kent-0.8.8 app/mailers/clark_kent/report_mailer.rb
clark_kent-0.8.7 app/mailers/clark_kent/report_mailer.rb
clark_kent-0.8.6 app/mailers/clark_kent/report_mailer.rb
clark_kent-0.8.5 app/mailers/clark_kent/report_mailer.rb