Class: FormProfiles::VA21p527ez
- Inherits:
-
FormProfile
- Object
- FormProfile
- FormProfiles::VA21p527ez
- Defined in:
- app/models/form_profiles/va_21p527ez.rb
Overview
extends app/models/form_profile.rb, which handles form prefill
Instance Method Summary collapse
-
#initialize_military_information ⇒ Object
overrides FormProfile#initialize_military_information to use Pension21p527ez::PensionFormMilitaryInformation instead of FormProfile::FormMilitaryInformation in order to add additional military information fields.
-
#initialize_va_profile_prefill_military_information ⇒ Object
private
overrides FormProfile#initialize_va_profile_prefill_military_information Pension21p527ez::PensionMilitaryInformation instead of FormProfile::MilitaryInformation in order to add additional military information fields.
- #metadata ⇒ Object
Instance Method Details
#initialize_military_information ⇒ Object
overrides FormProfile#initialize_military_information to use Pension21p527ez::PensionFormMilitaryInformation instead of FormProfile::FormMilitaryInformation in order to add additional military information fields.
20 21 22 23 24 25 26 27 |
# File 'app/models/form_profiles/va_21p527ez.rb', line 20 def initialize_military_information return {} unless user. :va_profile, :access? military_information_data = {} military_information_data.merge!(initialize_va_profile_prefill_military_information) military_information_data[:vic_verified] = user.can_access_id_card? Pension21p527ez::PensionFormMilitaryInformation.new(military_information_data) end |
#initialize_va_profile_prefill_military_information ⇒ Object (private)
overrides FormProfile#initialize_va_profile_prefill_military_information Pension21p527ez::PensionMilitaryInformation instead of FormProfile::MilitaryInformation in order to add additional military information fields.
36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'app/models/form_profiles/va_21p527ez.rb', line 36 def initialize_va_profile_prefill_military_information military_information_data = {} military_information = Pension21p527ez::PensionMilitaryInformation.new(user) Pension21p527ez::PensionMilitaryInformation::PREFILL_METHODS.each do |attr| military_information_data[attr] = military_information.public_send(attr) end military_information_data rescue => e log_exception_to_sentry(e, {}, prefill: :va_profile_prefill_military_information) {} end |
#metadata ⇒ Object
7 8 9 10 11 12 13 |
# File 'app/models/form_profiles/va_21p527ez.rb', line 7 def { version: 0, prefill: true, returnUrl: '/applicant/information' } end |