Class: SpotlightSearch::ExportMailer
- Inherits:
-
ActionMailer::Base
- Object
- ActionMailer::Base
- SpotlightSearch::ExportMailer
- Defined in:
- app/mailers/spotlight_search/export_mailer.rb
Instance Method Summary collapse
Instance Method Details
#send_error_message(email, err) ⇒ Object
10 11 12 13 14 |
# File 'app/mailers/spotlight_search/export_mailer.rb', line 10 def (email, err) @error_message = err. mail(to: email, subject: "Error generating CSV file") Rollbar.error(err) end |
#send_excel_file(email, file_path, subject) ⇒ Object
5 6 7 8 |
# File 'app/mailers/spotlight_search/export_mailer.rb', line 5 def send_excel_file(email, file_path, subject) [file_path.split('/').last] = File.read(file_path) mail(to: email, subject: subject) end |