Sha256: e918aefab8ccb7a19318acc4a9442e165e3c93d49e96f805c1e97c43af6546cc
Contents?: true
Size: 1.73 KB
Versions: 62
Compression:
Stored size: 1.73 KB
Contents
module Workarea module Admin class DataFileMailer < Admin::ApplicationMailer include NavigationHelper helper_method :index_url_for rescue_from Mongoid::Errors::DocumentNotFound, with: {} # ignore, noop def export(id) @export = DataFile::Export.find(id) mail( bcc: @export.emails, from: Workarea.config.email_from, subject: t( 'workarea.admin.data_file_mailer.export.subject', name: @export.name.downcase ) ) end def import(id) @import = DataFile::Import.find(id) @user = User.find(@import.created_by_id) mail( to: @user.email, from: Workarea.config.email_from, subject: t( 'workarea.admin.data_file_mailer.import.subject', type: @import.name.downcase, file: @import.file_name ) ) end def import_failure(id) @import = DataFile::Import.find(id) @user = User.find(@import.created_by_id) mail( to: @user.email, from: Workarea.config.email_from, subject: t( "workarea.admin.data_file_mailer.import_failure.subject", type: @import.name.downcase, file: @import.file_name ) ) end def import_error(id) @import = DataFile::Import.find(id) @user = User.find(@import.created_by_id) mail( to: @user.email, from: Workarea.config.email_from, subject: t( 'workarea.admin.data_file_mailer.import_error.subject', type: @import.name.downcase, file: @import.file_name ) ) end end end end
Version data entries
62 entries across 62 versions & 1 rubygems