From fcbef516564c1c6777a420ff5898578d81502e60 Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Mon, 18 Nov 2019 11:24:13 +0100 Subject: [PATCH] Disable ActionView partial path prefixing If you want to render alchemy elements in a Solidus controller namespace, we need to disable prefixing of controller path to partial paths, or we get an extra `spree` namespace for the element partial paths and the elements wont render. Closes https://github.com/AlchemyCMS/alchemy_cms/issues/1626 --- lib/alchemy/solidus/alchemy_in_solidus.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/alchemy/solidus/alchemy_in_solidus.rb b/lib/alchemy/solidus/alchemy_in_solidus.rb index 9f2fbde..05bc8ef 100644 --- a/lib/alchemy/solidus/alchemy_in_solidus.rb +++ b/lib/alchemy/solidus/alchemy_in_solidus.rb @@ -12,3 +12,7 @@ Spree::UserSessionsController.include Alchemy::ControllerActions end end + +# Do not prefix element view partials with `spree` namespace. +# See https://github.com/AlchemyCMS/alchemy_cms/issues/1626 +ActionView::Base.prefix_partial_path_with_controller_namespace = false