Skip to content

Commit

Permalink
fix issue spree-contrib#209 stores layouts not rendering with rails 6
Browse files Browse the repository at this point in the history
  • Loading branch information
narch committed Nov 7, 2019
1 parent d3e6c40 commit 1f93bfb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/spree_multi_domain/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ def self.activate
initializer "templates with dynamic layouts" do |app|
ActionView::TemplateRenderer.prepend(
Module.new do
def render(context, options)
@view = context
super(context, options)
end

def find_layout(layout, locals, formats=[])
store_layout = layout
if @view.respond_to?(:current_store) && @view.current_store && !@view.controller.is_a?(Spree::Admin::BaseController) && !@view.controller.is_a?(Spree::Api::BaseController)
Expand Down

0 comments on commit 1f93bfb

Please sign in to comment.