app/mailers/offer_mailer.rb
# Inform email addresses about new offers after they have subscribed.
# A lot of variables have to be prepared for the email, so we are OK with
# a slightly higher assignment branch condition size and disable rubocop
# rubocop:disable Metrics/AbcSize, Metrics/MethodLength
Inform email addresses about new offers after they have subscribed.
A lot of variables have to be prepared for the email, so we are OK with
a slightly higher assignment branch condition size and disable rubocop
rubocop:disable Metrics/AbcSize, Metrics/MethodLength
Inform email addresses about new offers after they have subscribed . A lot of variables have to be prepared for the email so we are OK with a slightly higher assignment branch condition size and disable rubocop rubocop : disable Metrics / AbcSize Metrics / MethodLength
def newly_approved_offers email, offers
    @contact_person = email.contact_people.first
    @offer = offers.count == 1 ? offers.first : nil
    @section_suffix = get_section_suffix offers
    @unsubscribe_href = get_sub_or_unsub_href email, 'unsubscribe'
    @offer_href = get_offer_href_for_single_offer offers.first, @section_suffix
    @vague_title = email.vague_contact_title?
    @overview_href_suffix = "/emails/#{email.id}/angebote"
    @utm_tagging_suffix = generate_utm_suffix offers, 'AO', 'FU'
    headers['X-SMTPAPI'] =
      { category: ['newly approved offer', @section_suffix] }.to_json
    send_emails email, offers, :newly_approved,
                t('.subject', count: offers.count,
                              name: t(
                                ".clarat_name_subject.#{@section_suffix}"
                              ))
  end
def newly_approved_offers email , offers @contact_person = email . contact_people . first @offer = offers . count == 1 ? offers . first : nil @section_suffix = get_section_suffix offers @unsubscribe_href = get_sub_or_unsub_href email , 'unsubscribe' @offer_href = get_offer_href_for_single_offer offers . first , @section_suffix @vague_title = email . vague_contact_title? @overview_href_suffix = "/emails/#{email.id}/angebote" @utm_tagging_suffix = generate_utm_suffix offers , 'AO' , 'FU' headers [ 'X-SMTPAPI' ] = { category : [ 'newly approved offer' , @section_suffix ] } . to_json send_emails email , offers , :newly_approved , t ( '.subject' , count : offers . count , name : t ( ".clarat_name_subject.#{@section_suffix}" ) ) end
Inform email addresses about new offers after they have subscribed.
Inform email addresses about new offers after they have subscribed .
email
<not_specific>
offers
<not_specific>