From d97b46cd5bb47b779beb3be61ba092730a1c6323 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bellet Date: Fri, 12 Feb 2021 17:14:13 +0100 Subject: [PATCH] add new feature for beta testers: unit_price The aim of this "feature toggle" is to enable the unit price display for each product/variants. By default activate on both development and staging environment. --- config/initializers/feature_toggles.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/initializers/feature_toggles.rb b/config/initializers/feature_toggles.rb index 9c31940462..a0f900c44a 100644 --- a/config/initializers/feature_toggles.rb +++ b/config/initializers/feature_toggles.rb @@ -9,3 +9,7 @@ OpenFoodNetwork::FeatureToggle.enable(:customer_balance) do |user| beta_testers.include?(user.email) end end + +OpenFoodNetwork::FeatureToggle.enable(:unit_price) do + ['development', 'staging'].include?(ENV['RAILS_ENV']) +end