File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,7 +23,11 @@ def valid_format?(request)
2323# the path below.
2424# If the dummy page entry that represents this app is moved in Contentful, this url will need to be updated,
2525# a redirect added in Contentful, and the CloudFront config changed to reflect the new url.
26- CSR_APP_PATH = "/consumer/your-energy/get-a-better-energy-deal/compare-domestic-energy-suppliers-customer-service/"
26+ CSR_APP_PATH = if Feature . enabled? ( "FF_NEW_CSR_URL" )
27+ "/consumer/energy/energy-supply/get-a-better-energy-deal/compare-domestic-energy-suppliers-customer-service/"
28+ else
29+ "/consumer/your-energy/get-a-better-energy-deal/compare-domestic-energy-suppliers-customer-service/"
30+ end
2731
2832Rails . application . routes . draw do
2933 # Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html
@@ -35,6 +39,13 @@ def valid_format?(request)
3539
3640 constraints CountryConstraint . new do
3741 scope "(:country)" do
42+ if Feature . enabled? ( "FF_NEW_CSR_URL" )
43+ get "/consumer/your-energy/get-a-better-energy-deal/compare-domestic-energy-suppliers-customer-service" ,
44+ to : redirect ( CSR_APP_PATH )
45+ get "/consumer/your-energy/get-a-better-energy-deal/compare-domestic-energy-suppliers-customer-service/:id/details" ,
46+ to : redirect ( "#{ CSR_APP_PATH } %{id}/details" )
47+ end
48+
3849 # full table page
3950 get CSR_APP_PATH , to : "csr_table/suppliers#index" , as : "suppliers"
4051
You can’t perform that action at this time.
0 commit comments