Skip to content

Commit

Permalink
Disable ActionView partial path prefixing
Browse files Browse the repository at this point in the history
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 AlchemyCMS/alchemy_cms#1626
  • Loading branch information
tvdeyen committed Nov 18, 2019
1 parent 17077cc commit 6881f6c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/alchemy/solidus/alchemy_in_solidus.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@
Spree::BaseController.send :include, Alchemy::ControllerActions
Spree::UserSessionsController.send :include, Alchemy::ControllerActions if defined? Spree::UserSessionsController
Spree::BaseController.send :include, Alchemy::ConfigurationMethods

# 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

0 comments on commit 6881f6c

Please sign in to comment.