Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Fixed rendering page sections inside other engines, eg. devise with s… (#12455)

Damian Legawiec5d104daf2930
diff --git a/storefront/app/helpers/spree/page_helper.rb b/storefront/app/helpers/spree/page_helper.rb
index b9d1c8791e..39d3d5cd02 100644
--- a/storefront/app/helpers/spree/page_helper.rb
+++ b/storefront/app/helpers/spree/page_helper.rb
@@ -26,7 +26,7 @@ module Spree
editor_link: spree.edit_admin_page_section_path(section)
}
) do
- render(section, **variables)
+ render('/' + section.to_partial_path, **variables)
end
end
elsif section.lazy? && lazy_allowed
@@ -36,10 +36,10 @@ module Spree
path = section.lazy_path(variables)
turbo_frame_tag("section-#{section.id}", src: path, loading: 'eager') do
- render(section, **variables)
+ render('/' + section.to_partial_path, **variables)
end
else
- render(section, **variables)
+ render('/' + section.to_partial_path, **variables)
end
rescue ActionView::MissingTemplate, ActionView::Template::Error => e
raise e unless Rails.env.production?