From 1671afae42ab1b76b54c0a69d4cc4df48afb5a79 Mon Sep 17 00:00:00 2001 From: Ben <95949082+kasugaijin@users.noreply.github.com> Date: Sat, 7 Dec 2024 15:02:30 -0800 Subject: [PATCH] reimplement how we handled script name for mailers and fix the production config to remove the trailing / because it was resulting in URLs with two slashes before the slug... (#1215) --- app/mailers/sign_up_mailer.rb | 2 +- app/views/adoption_mailer/new_adoption.html.erb | 2 +- app/views/foster_mailer/new_foster.html.erb | 2 +- .../organization_mailer/create_new_org_and_admin.html.erb | 4 ++-- app/views/sign_up_mailer/adopter_welcome_email.html.erb | 6 +++--- config/environments/production.rb | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/mailers/sign_up_mailer.rb b/app/mailers/sign_up_mailer.rb index 39df64c7f..0d591790c 100644 --- a/app/mailers/sign_up_mailer.rb +++ b/app/mailers/sign_up_mailer.rb @@ -3,6 +3,6 @@ def adopter_welcome_email(current_tenant) @organization = current_tenant @user = params[:user] - mail(to: @user.email, subject: "Welcome to #{@organization.name}") + mail(to: @user.email, subject: "No Reply: Welcome to #{@organization.name}") end end diff --git a/app/views/adoption_mailer/new_adoption.html.erb b/app/views/adoption_mailer/new_adoption.html.erb index a71de5e92..461b28a1c 100644 --- a/app/views/adoption_mailer/new_adoption.html.erb +++ b/app/views/adoption_mailer/new_adoption.html.erb @@ -6,7 +6,7 @@
To view <%= @pet.name %>'s tasks and downloadable files, please go to your <%= link_to "Adopted Pets", adopter_fosterer_adopted_pets_url(script_name: "#{@organization.slug}"), target: "_blank" %> page.
+To view <%= @pet.name %>'s tasks and downloadable files, please go to your <%= link_to "Adopted Pets", adopter_fosterer_adopted_pets_url(script_name: "/#{@organization.slug}"), target: "_blank" %> page.
Have a great day!
diff --git a/app/views/foster_mailer/new_foster.html.erb b/app/views/foster_mailer/new_foster.html.erb index fa791b0e4..9ea9181b1 100644 --- a/app/views/foster_mailer/new_foster.html.erb +++ b/app/views/foster_mailer/new_foster.html.erb @@ -11,7 +11,7 @@To view <%= @pet.name %>'s tasks and downloadable files, please go to your <%= link_to "Fostered Pets", adopter_fosterer_fostered_pets_url(script_name: "#{@organization.slug}"), target: "_blank" %> page.
+To view <%= @pet.name %>'s tasks and downloadable files, please go to your <%= link_to "Fostered Pets", adopter_fosterer_fostered_pets_url(script_name: "/#{@organization.slug}"), target: "_blank" %> page.
Please do not reply directly to this email. You must contact <%= @organization.name %> directly at <%= @organization.email %> diff --git a/app/views/organization_mailer/create_new_org_and_admin.html.erb b/app/views/organization_mailer/create_new_org_and_admin.html.erb index 936886cad..6f3026536 100644 --- a/app/views/organization_mailer/create_new_org_and_admin.html.erb +++ b/app/views/organization_mailer/create_new_org_and_admin.html.erb @@ -7,7 +7,7 @@- You can access your site at: <%= link_to "#{root_url}#{@organization.slug}", home_index_url(script_name: "#{@organization.slug}"), target: "_blank" %> + You can access your site at: <%= link_to "#{root_url}#{@organization.slug}", home_index_url(script_name: "/#{@organization.slug}"), target: "_blank" %>
@@ -23,7 +23,7 @@
- <%= link_to "Log-in", new_user_session_url(script_name: "#{@organization.slug}"), target: "_blank" %> + <%= link_to "Log-in", new_user_session_url(script_name: "/#{@organization.slug}"), target: "_blank" %>
Homeward Tails Team diff --git a/app/views/sign_up_mailer/adopter_welcome_email.html.erb b/app/views/sign_up_mailer/adopter_welcome_email.html.erb index d61e0412b..737affac0 100644 --- a/app/views/sign_up_mailer/adopter_welcome_email.html.erb +++ b/app/views/sign_up_mailer/adopter_welcome_email.html.erb @@ -12,18 +12,18 @@Check out the <%= link_to "FAQ page", faq_index_url(script_name: "#{@organization.slug}"), target: "_blank" %>.
+Check out the <%= link_to "FAQ page", faq_index_url(script_name: "/#{@organization.slug}"), target: "_blank" %>.
Again, thank you for signing up! People like you help these pets live their best life.
- - <%= @organization.name %> Team