From 45d3bb4b3e5220f385c1ead08c237f4b2c6b22b1 Mon Sep 17 00:00:00 2001 From: Jorge Manrubia Date: Wed, 27 Aug 2025 11:30:08 +0200 Subject: [PATCH] Set current tenant in mailers --- app/mailers/application_mailer.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb index 24cf3f1a1..1ee79fb87 100644 --- a/app/mailers/application_mailer.rb +++ b/app/mailers/application_mailer.rb @@ -4,4 +4,9 @@ class ApplicationMailer < ActionMailer::Base layout "mailer" append_view_path Rails.root.join("app/views/mailers") helper AvatarsHelper, HtmlHelper + + private + def default_url_options + super.merge(script_name: "/#{ApplicationRecord.current_tenant}") + end end