Skip to content

Commit c163313

Browse files
committed
Refactor to use Feature.enabled?
1 parent 0ed2135 commit c163313

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

config/routes.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ 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 = if ENV.fetch("FF_NEW_CSR_URL", false)
26+
CSR_APP_PATH = if Feature.enabled?("FF_NEW_CSR_URL")
2727
"/consumer/energy/energy-supply/get-a-better-energy-deal/compare-domestic-energy-suppliers-customer-service/"
2828
else
2929
"/consumer/your-energy/get-a-better-energy-deal/compare-domestic-energy-suppliers-customer-service/"
@@ -39,7 +39,7 @@ def valid_format?(request)
3939

4040
constraints CountryConstraint.new do
4141
scope "(:country)" do
42-
if ENV.fetch("FF_NEW_CSR_URL", false)
42+
if Feature.enabled?("FF_NEW_CSR_URL")
4343
get "/consumer/your-energy/get-a-better-energy-deal/compare-domestic-energy-suppliers-customer-service",
4444
to: redirect(CSR_APP_PATH)
4545
get "/consumer/your-energy/get-a-better-energy-deal/compare-domestic-energy-suppliers-customer-service/:id/details",

0 commit comments

Comments
 (0)