Class: StemApplicantConfirmationMailer

Inherits:
TransactionalEmailMailer show all
Defined in:
app/mailers/stem_applicant_confirmation_mailer.rb

Constant Summary collapse

SUBJECT =
'VA Rogers STEM Scholarship, Application Confirmation'
GA_CAMPAIGN_NAME =
'stem_applicant_confirmation-10203-submission-notification'
GA_DOCUMENT_PATH =
'/email/form'
GA_LABEL =
'stem-applicant-confirmation-10203-submission-notification'
TEMPLATE =
'stem_applicant_confirmation'

Instance Method Summary collapse

Methods inherited from TransactionalEmailMailer

#first_and_last_name, #first_initial_last_name, #template

Instance Method Details

#application_dateObject



10
11
12
# File 'app/mailers/stem_applicant_confirmation_mailer.rb', line 10

def application_date
  @claim.created_at.strftime('%b %d, %Y')
end

#build(claim, ga_client_id) ⇒ Object



30
31
32
33
34
35
# File 'app/mailers/stem_applicant_confirmation_mailer.rb', line 30

def build(claim, ga_client_id)
  @applicant = claim.open_struct_form
  @claim = claim

  super([@applicant.email], ga_client_id, {})
end

#confirmation_numberObject



26
27
28
# File 'app/mailers/stem_applicant_confirmation_mailer.rb', line 26

def confirmation_number
  @claim.education_benefits_claim.confirmation_number
end

#regionObject (private)



39
40
41
# File 'app/mailers/stem_applicant_confirmation_mailer.rb', line 39

def region
  @claim.education_benefits_claim.regional_processing_office.to_sym
end

#region_addressObject



18
19
20
# File 'app/mailers/stem_applicant_confirmation_mailer.rb', line 18

def region_address
  EducationForm::EducationFacility::ADDRESSES[region][0]
end

#region_city_state_zipObject



22
23
24
# File 'app/mailers/stem_applicant_confirmation_mailer.rb', line 22

def region_city_state_zip
  EducationForm::EducationFacility::ADDRESSES[region][1]
end

#region_nameObject



14
15
16
# File 'app/mailers/stem_applicant_confirmation_mailer.rb', line 14

def region_name
  EducationForm::EducationFacility::EMAIL_NAMES[region]
end