Class: SavedClaim::EducationBenefits

Inherits:
SavedClaim show all
Defined in:
app/models/saved_claim/education_benefits.rb

Direct Known Subclasses

VA0993, VA0994, VA10203, VA1990, VA1990e, VA1990n, VA1990s, VA1995, VA5490, VA5495

Defined Under Namespace

Classes: VA0993, VA0994, VA10203, VA1990, VA1990e, VA1990n, VA1990s, VA1995, VA5490, VA5495

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from SavedClaim

add_form_and_validation, #after_create_metrics, #after_destroy_metrics, #attachment_keys, #business_line, #confirmation_number, #email, #form_is_string, #form_matches_schema, #form_must_be_string, #insert_notification, #open_struct_form, #parsed_form, #process_attachments!, #submitted_at, #to_pdf, #update_form, #va_notification?, #validate_form, #validate_schema

Methods inherited from ApplicationRecord

descendants_using_encryption, lockbox_options, #timestamp_attributes_for_update_in_model, #valid?

Class Method Details

.form_class(form_type) ⇒ Object



10
11
12
13
14
# File 'app/models/saved_claim/education_benefits.rb', line 10

def self.form_class(form_type)
  raise 'Invalid form type' unless EducationBenefitsClaim::FORM_TYPES.include?(form_type)

  "SavedClaim::EducationBenefits::VA#{form_type}".constantize
end

Instance Method Details

#add_education_benefits_claimObject (private)



29
30
31
# File 'app/models/saved_claim/education_benefits.rb', line 29

def add_education_benefits_claim
  build_education_benefits_claim if education_benefits_claim.nil?
end

#after_submit(user) ⇒ Object



20
# File 'app/models/saved_claim/education_benefits.rb', line 20

def after_submit(user); end

#in_progress_form_idObject



16
17
18
# File 'app/models/saved_claim/education_benefits.rb', line 16

def in_progress_form_id
  form_id
end

#regional_office_addressObject (private)



24
25
26
27
# File 'app/models/saved_claim/education_benefits.rb', line 24

def regional_office_address
  (_title, *address) = education_benefits_claim.regional_office.split("\n")
  address.join("\n")
end