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.

Use standard rails redirect_back method

Damian Legawiec30880004e03f
diff --git a/frontend/app/controllers/spree/currency_controller.rb b/frontend/app/controllers/spree/currency_controller.rb
index 2f4d37e5d7..b67befdbf6 100644
--- a/frontend/app/controllers/spree/currency_controller.rb
+++ b/frontend/app/controllers/spree/currency_controller.rb
@@ -7,7 +7,7 @@ module Spree
current_order&.update(currency: new_currency)
session[:currency] = new_currency
end
- redirect_back_or_default(root_path(currency: new_currency))
+ redirect_back fallback_location: spree.root_path(currency: new_currency)
end
end
end