From 384057cb48b127f1cbdc554f38a656ca42d608f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Wed, 19 Oct 2022 20:24:35 +0200 Subject: [PATCH] Allow different custom images per tenant Note this only affects images which can also be customized using the administration interface; other images like `avatar_admin.png` must be the same for all tenants. I think this is good enough for now, since the images that can't be different are the images that aren't customized that often, and if there's a need to use different images in a certain CONSUL installation, it can be achieved by changing the code which renders that image so it uses `image_path_for`. --- app/helpers/application_helper.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index e1c35eee5..a0ff6f621 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -53,6 +53,8 @@ module ApplicationHelper if image polymorphic_path(image) + elsif AssetFinder.find_asset(File.join(Tenant.subfolder_path, filename)) + File.join(Tenant.subfolder_path, filename) else filename end