mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user