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.

Move store_locale method to ControllerHelpers::Store

Damian Legawiec4f9b24493d96
diff --git a/core/lib/spree/core/controller_helpers/store.rb b/core/lib/spree/core/controller_helpers/store.rb
index 2746f1d8c1..2e47644cc4 100644
--- a/core/lib/spree/core/controller_helpers/store.rb
+++ b/core/lib/spree/core/controller_helpers/store.rb
@@ -29,6 +29,10 @@ module Spree
@current_store ||= Spree::Store.current(request.env['SERVER_NAME'])
end
+ def store_locale
+ current_store.default_locale
+ end
+
# Return a Hash of things that influence the prices displayed in your shop.
#
# By default, the only thing that influences prices that is the current order's +tax_zone+
diff --git a/frontend/app/controllers/spree/store_controller.rb b/frontend/app/controllers/spree/store_controller.rb
index cfa1856713..ef8a197148 100644
--- a/frontend/app/controllers/spree/store_controller.rb
+++ b/frontend/app/controllers/spree/store_controller.rb
@@ -39,10 +39,6 @@ module Spree
Spree::Frontend::Config[:locale]
end
- def store_locale
- current_store.default_locale
- end
-
def store_etag
[
current_store,