Redirect /checkout/whatever to /checkout when split_checkout is activate

+ constraint the legacy checkout routes when `split_checkout` feature is disabled

+ add specs
This commit is contained in:
Jean-Baptiste Bellet
2022-12-20 11:09:34 +01:00
committed by Filipe
parent ee70645d04
commit b2db63178f
3 changed files with 77 additions and 3 deletions

View File

@@ -12,5 +12,9 @@ module OpenFoodNetwork
feature.add unless feature.exist?
feature.enabled?(user)
end
def self.disabled?(feature_name, user = nil)
!enabled?(feature_name, user)
end
end
end