Enable running Flipper migration

The initializer ran code the needs the database in the migrated state.
The decision is to not initialize anything relative to feature. This has to be done within the FlipperUI by the instance managers.
This commit is contained in:
Jean-Baptiste Bellet
2021-04-08 14:57:36 +02:00
parent 7a0912d5a4
commit 796068439d
2 changed files with 0 additions and 9 deletions

View File

@@ -3,7 +3,3 @@ require 'open_food_network/feature_toggle'
OpenFoodNetwork::FeatureToggle.enable(:customer_balance) do |user|
true
end
OpenFoodNetwork::FeatureToggle.enable(:unit_price) do
Rails.env.development?
end

View File

@@ -9,8 +9,3 @@ end
Rails.configuration.middleware.use Flipper::Middleware::Memoizer, preload_all: true
Flipper.register(:admins) { |actor| actor.respond_to?(:admin?) && actor.admin? }
if !Flipper[:unit_price].exist?
# Unit price default setup, could be overided by admin in the flipper-ui interface
Flipper.enable_group :unit_price, :admins
end