Class: FormProfiles::FeedbackTool
- Inherits:
-
FormProfile
- Object
- FormProfile
- FormProfiles::FeedbackTool
- Defined in:
- app/models/form_profiles/feedback_tool.rb
Instance Method Summary collapse
Instance Method Details
#convert_country!(form_data) ⇒ Object
12 13 14 15 16 |
# File 'app/models/form_profiles/feedback_tool.rb', line 12 def convert_country!(form_data) country = form_data.try(:[], 'address').try(:[], 'country') form_data['address']['country'] = IsoCountryCodes.find(country).alpha2 if country.present? && country.size == 3 end |
#metadata ⇒ Object
4 5 6 7 8 9 10 |
# File 'app/models/form_profiles/feedback_tool.rb', line 4 def { version: 0, prefill: true, returnUrl: '/applicant-relationship' } end |
#prefill(*args) ⇒ Object
18 19 20 21 22 23 |
# File 'app/models/form_profiles/feedback_tool.rb', line 18 def prefill(*args) return_val = super convert_country!(return_val[:form_data]) return_val end |