diff --git a/app/forms/email_address_form.rb b/app/forms/email_address_form.rb index 4a8e77b070..06c2c8f5a1 100644 --- a/app/forms/email_address_form.rb +++ b/app/forms/email_address_form.rb @@ -30,7 +30,7 @@ def save journey_session.save! - ClaimMailer.email_verification(answers, otp_code, journey_session.journey_class.name).deliver_now + ClaimMailer.email_verification(answers, otp_code, journey_session.journey_class.journey_name).deliver_now end private diff --git a/app/forms/reminders/personal_details_form.rb b/app/forms/reminders/personal_details_form.rb index 12084c7d4d..f6dd71a987 100644 --- a/app/forms/reminders/personal_details_form.rb +++ b/app/forms/reminders/personal_details_form.rb @@ -37,7 +37,7 @@ def save! reminder_otp_secret: ) - ReminderMailer.email_verification(reminder, otp_code, journey_session.journey_class.name).deliver_now + ReminderMailer.email_verification(reminder, otp_code, journey_session.journey_class.journey_name).deliver_now journey_session.save! end diff --git a/app/models/journeys/base.rb b/app/models/journeys/base.rb index 38e027b7c0..30cfc2a42a 100644 --- a/app/models/journeys/base.rb +++ b/app/models/journeys/base.rb @@ -70,7 +70,7 @@ def requires_student_loan_details? false end - def name + def journey_name I18n.t(:journey_name, scope: self::I18N_NAMESPACE) end end diff --git a/spec/forms/email_address_form_spec.rb b/spec/forms/email_address_form_spec.rb index 90de47d2d9..dcc17ccad4 100644 --- a/spec/forms/email_address_form_spec.rb +++ b/spec/forms/email_address_form_spec.rb @@ -83,7 +83,7 @@ first_name: "Jo", one_time_password: "111111", support_email_address: support_email_address, - journey_name: journey_session.journey_class.name + journey_name: journey_session.journey_class.journey_name ) end