Sha256: 595e61a7fd0044679bb1c82e8c64271125c49804de60929281f96a99f48b0506

Contents?: true

Size: 810 Bytes

Versions: 9

Compression:

Stored size: 810 Bytes

Contents

# frozen_string_literal: true
# Only works for documents with a #to_marc right now. 
class RecordMailer < ActionMailer::Base
  def email_record(documents, details, url_gen_params)
        
    title = begin
              documents.first.to_semantic_values[:title]
            rescue
              I18n.t('blacklight.email.text.default_title')
            end
    subject = I18n.t('blacklight.email.text.subject', :count => documents.length, :title => title )

    @documents      = documents
    @message        = details[:message]
    @url_gen_params = url_gen_params

    mail(:to => details[:to],  :subject => subject)
  end
  
  def sms_record(documents, details, url_gen_params)
    @documents      = documents
    @url_gen_params = url_gen_params
    mail(:to => details[:to], :subject => "")
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
blacklight-6.5.0 app/models/record_mailer.rb
blacklight-6.4.2 app/models/record_mailer.rb
blacklight-6.4.1 app/models/record_mailer.rb
blacklight-6.4.0 app/models/record_mailer.rb
blacklight-6.3.3 app/models/record_mailer.rb
blacklight-6.3.1 app/models/record_mailer.rb
blacklight-6.3.0 app/models/record_mailer.rb
blacklight-6.2.0 app/models/record_mailer.rb
blacklight-6.1.0 app/models/record_mailer.rb